[R-sig-ME] mismatch between R lme and SPSS mixed model

Mengni Zhang mzhang at newfields.com
Wed Apr 6 20:35:23 CEST 2016


I'm using linear mixed model on an ecology dataset. I want to test whether location and year has an impact on bird egg which were sampled from different marshes and nests. I found a slight mismatch on the results between the R function "lme" and the SPSS option "Mixed Model". Does anyone know the potential reasons for the mismatch? The differences on p-values are not big. For example, the p-value of fixed factor Year is 0.031 from R and 0.029 from SPSS, and the p-value of fixed factor Location is 0.51 from R and 0.43 from SPSS.

My R code is: model1 <- lme(Results~Location+Year, data=data, random=~1|Marsh/NEST)

My SPSS syntax is set as below:
*Generalized Linear Mixed Models.
GENLINMIXED
  /DATA_STRUCTURE SUBJECTS=Marsh*NEST*EGG
  /FIELDS TARGET=Results TRIALS=NONE OFFSET=NONE
  /TARGET_OPTIONS DISTRIBUTION=NORMAL LINK=IDENTITY
  /FIXED  EFFECTS=Location Year USE_INTERCEPT=TRUE
  /RANDOM USE_INTERCEPT=TRUE SUBJECTS=Marsh COVARIANCE_TYPE=VARIANCE_COMPONENTS
  /RANDOM USE_INTERCEPT=TRUE SUBJECTS=Marsh*NEST COVARIANCE_TYPE=VARIANCE_COMPONENTS
  /BUILD_OPTIONS TARGET_CATEGORY_ORDER=ASCENDING INPUTS_CATEGORY_ORDER=ASCENDING MAX_ITERATIONS=100 CONFIDENCE_LEVEL=95 DF_METHOD=RESIDUAL COVB=MODEL PCONVERGE=0.000001(ABSOLUTE) SCORING=0 SINGULAR=0.000000000001
  /EMMEANS TABLES=Location COMPARE=Location CONTRAST=PAIRWISE
   /EMMEANS TABLES=Year COMPARE=Year CONTRAST=PAIRWISE
  /EMMEANS_OPTIONS SCALE=ORIGINAL PADJUST=SEQSIDAK.

Thank you very much!




Please note that this message and any attachments may be protected by federal and/or state privacy laws and might also contain information that is privileged, confidential, and/or subject to attorney/client, attorney work product, or other similar protections.  If you suspect that you are not the intended recipient of this message, please be so kind as to reply and let me know of my error and then delete the message and any attachments, without further dissemination, copying, or distribution.  Thank you.
	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list