I have a question about SAS and R. For a research, I used a longitudinal data and I initially used SAS (GLIMMIX
) and then I analyzed the data with R (glmer
) programming. There are differences between p-values of SAS and R. I expected that regression coefficient and standard error could be different for R and SAS. But there are differences for p value for some variables, which are significant in R, are not significant in SAS.
My R model and SAS model are respectively :
#R
m3.glmm <- glmer(y ~ timebefore + timeafter + x1 + x2 +...+ x11 +
(1+timebefore+timeafter|id),
data=data, family=binomial(link="logit"), nAGQ=3)
#SAS
proc glimmix data=data METHOD=QUAD(QPOINTS=3) NOCLPRINT ;
class id x2 x3 x4 x5;
model y(event='1')=timebefore timeafter x1 x2 x3 x4 x5
x6 x7 x8 x9 x10 x11 /solution CL link = logit dist = binary;
random intercept timebefore timeafter/subject = id GCORR SOLUTION;
run;
Eg: variable "x1"(defined as age) was significant (p val= 0.04) in SAS but not in R (p val=0.1). But others were similar. It means that significant variables in SAS are found significant in R, or insignificant variables in SAS are insignificant in R.
Does anybody know about the differences?