[R] difference between splus and R

Faheem Mitha faheem at email.unc.edu
Fri Apr 7 01:31:22 CEST 2000


I'm running splus 5 on a solaris platform remotely, and running R on linux
on my home machine.

On Splus I have the two random effects models:

ran1 <- lme(fixed = earning ~ edu + job.pres + age,
            random = ~ 1 + job.pres + age,cluster = ~ clus, data =
labor.df )
 
ran2 <- lme(fixed = earning ~ edu + job.pres + age,
            random = ~ 1 + job.pres, cluster = ~ clus, data = labor.df )

anova(ran2,ran1) gives me 

     Model Df    AIC    BIC  Loglik    Test Lik.Ratio P value
ran2     1  8 3371.5 3406.8 -1677.7
ran1     2 11 3378.7 3427.2 -1678.3 1 vs. 2     1.189 0.75565

On R I have the random models 

ran1 <- lme(fixed = earning ~ edu + job.pres + age,
     random = ~ 1 + job.pres + age | clus, data = labor.df )

ran2 <- lme(fixed = earning ~ edu + job.pres + age,
            random = ~ 1 + job.pres | clus, data = labor.df )

anova(ran2,ran1) gives me 

    Model df      AIC      BIC    logLik   Test    L.Ratio p-value
ran2     1  8 3371.489 3406.705 -1677.745                          
ran1     2 11 3377.515 3425.936 -1677.757 1 vs 2 0.02544750  0.9989

The models are supposed to be identical, and my understanding of the L
ratio and the p value is that it the values corresponding to the null
hypothesis that the smaller model is true ie. that the random effect due
to age is zero. So a large p value in both cases corresponds to strong
evidence in favour of the p value. 

My understanding is that both R and Splus are doing exactly this. So why
are they returning different value. Are the models somehow different?

Another possibility is that one is using ordinary likelihood and the other
is using REML. I see from the R documentation that REML is indeed used
here and I thought the same was true of Splus.

Also, I did summary(ran1) for both splus and R and the results which
similar, did differ, for example in the estimation of the fixed effects.

Can anyone shed light on this? Am I missing something obvious?

                                         Sincerely, Faheem Mitha.



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list