Compare SPSS and R for GLMM. HELP

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Compare SPSS and R for GLMM. HELP

Kornbrot, Diana

Help need to replicate SPSS analyses in R

Please excuse post is long so that syntax is explicit

Am using SPSS  to perform ANOVA on data with following structure


between factor, b1 (2 levels), within factor, w1 ( 2 levels) within factor, w2, ( 3 levels)

random factor is pno nested under w1, w2

MIXED on long version gives same results as REPEATED, multivariate on wide version

This makes me happy! Being able to replicate in R would make me delirious!

How can same analysis be performed in R?

Am using lmer  via JAMOVI and have failed to replicate

Both SPSS and R claim to be using Satherwaite, BUT give very different degrees of freedom

Sample files on request SPSS list serve has rejected all formats I tried

DETAILS

*Generalized Linear Mixed Models.

GENLINMIXED

  /DATA_STRUCTURE SUBJECTS=pno REPEATED_MEASURES=w1*w2 COVARIANCE_TYPE=UNSTRUCTURED

  /FIELDS TARGET=proptn TRIALS=NONE OFFSET=NONE

  /TARGET_OPTIONS DISTRIBUTION=NORMAL LINK=IDENTITY

  /FIXED  EFFECTS=b1 w1 w2 b1*w1 b1*w2 w1*w2 b1*w1*w2 USE_INTERCEPT=TRUE

  /BUILD_OPTIONS TARGET_CATEGORY_ORDER=ASCENDING INPUTS_CATEGORY_ORDER=ASCENDING MAX_ITERATIONS=100 CONFIDENCE_LEVEL=95 DF_METHOD=SATTERTHWAITE COVB=MODEL PCONVERGE=0.000001(ABSOLUTE) SCORING=0 SINGULAR=0.000000000001

  /EMMEANS TABLES=b1 CONTRAST=NONE

   /EMMEANS TABLES=w1 CONTRAST=NONE

   /EMMEANS TABLES=w2 COMPARE=w2 CONTRAST=PAIRWISE

   /EMMEANS TABLES=b1*w1 CONTRAST=NONE

   /EMMEANS TABLES=b1*w2 COMPARE=b1 CONTRAST=PAIRWISE

   /EMMEANS TABLES=w1*w2 COMPARE=w1 CONTRAST=PAIRWISE

   /EMMEANS TABLES=b1*w1*w2 COMPARE=b1 CONTRAST=PAIRWISE

  /EMMEANS_OPTIONS SCALE=ORIGINAL PADJUST=LSD.

REPEATED

GLM Pw11 Pw12 Pw13 Pw21 Pw22 Pw23 BY b1

  /WSFACTOR=w1 2 Repeated w2 3 Repeated

  /METHOD=SSTYPE(3)

  /PLOT=PROFILE(b1*w2) TYPE=LINE ERRORBAR=CI MEANREFERENCE=NO YAXIS=AUTO

  /EMMEANS=TABLES(OVERALL)

  /EMMEANS=TABLES(b1)

  /EMMEANS=TABLES(w2)

  /EMMEANS=TABLES(b1*w2)

  /EMMEANS=TABLES(w1)

  /EMMEANS=TABLES(b1*w1)

  /EMMEANS=TABLES(w1*w2)

  /EMMEANS=TABLES(b1*w1*w2)

  /CRITERIA=ALPHA(.05)

  /WSDESIGN=w1 w2 w1*w2

  /DESIGN=b1.

R syntax generated by JAMOVI for random Intercept model

proptn ~ 1 + b1 + w1 + w2 + b1:w1 + b1:w2 + w1:w2 + b1:w1:w2+( 1 | pno)

Many thanks for help

best
Diana


____________
University of Hertfordshire
College Lane, Hatfield, Hertfordshire AL10 9AB, UK
+44 (0) 208 444 2081
+44 (0) 7403 18 16 12
[hidden email]
http://dianakornbrot.wordpress.com/
skype:  kornbrotme
Save our in-boxes! http://emailcharter.org
 __________________



===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD