[R] difference between splus and R

Faheem Mitha faheem at email.unc.edu
Fri Apr 7 15:55:08 CEST 2000


On Fri, 7 Apr 2000, Prof Brian D Ripley wrote:

> On Thu, 6 Apr 2000, Faheem Mitha wrote:
> 
> > 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 )
> 
> Might I suggest you install nlme 3.x on Splus5 too? (nlme.stat.wisc.edu)
> Then you won't have to use two different syntaxes.

Not an option, unfortunately. It is a univ mainframe, and I don't have
those kinds of powers. I can ask them (the powers that be)  nicely to do
it, I suppose. How should I convince them that nlme3.x is better than nlme
2.x which they presumably have installed?

> > The models are supposed to be identical, and my understanding of the L
> > ratio and the p value is that they are 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 null hypothesis.
 
> > 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.
 
> (The fits for ran2 give the same statistics, so look both to be REML.) 
> You should not be using anova on lme models fitted with REML. Although in
> this case they are using the same fixed-effects model and so are on
> comparable data, the supporting theory is for ML fits only, AFAIK.

I am only using the prepackaged function anova.lme from the package nlme.
If you look at the documentation, you will see that not doing anything
unconventional with it. While I am not sure what likelihood ratio
statistic is being used (the documentation does not say, but it appears
that it is probably REML-based) if it is not a legitimate test, then why
is it included in the package?

Thank you for your response.
                                   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