Re: [R] R-help Digest, Vol 171, Issue 20

2017-05-29 Thread Brigitte Mangin
Thanks Ron,

In fact, I want to make a model choice using different fixed structures and 
using the results of:
Gurka MJ (2006) Selecting the best linear mixed model under reml. The American 
Statistician 60(1):19{26,
the best criterium uses the reml likelihood.

I asked the ASREML-r developpers and they answered that their results were 
checked against GENSTAT.

I think it is not really a good think for the R community to compute a REML 
likelihood that is probably not the REML likelihood.

Brigitte



Brigitte Mangin, INRA, LIPM, CS 52627, 31326 CASTANET-TOLOSAN
tel: 33 + (0)5 61 28 54 58


De : Crump, Ron <r.e.cr...@warwick.ac.uk>
Envoyé : mardi 23 mai 2017 10:29
À : r-help@r-project.org; Brigitte Mangin
Objet : Re: R-help Digest, Vol 171, Issue 20

Hi Brigitte,

>Did somebody know why asreml does not provide the same REML loglikehood
>as coxme, lme4 or lmne.

I don't know the answer to this, but I'd guess it is either to do with the
use of the average information REML algorithm or asreml-r is for some
reason ending up with a different subset of the data.

>If it was just a constant value between the two models (with or without
>the fixed effect) it would not be important. But it is not.
>I checked that the variance component estimators were equal.

I'm still not clear that it is important (if the data subset analysed is
the same). You would only use the REML likelihoods to compare models with
different random effects and the same fixed effect structure (is there
another use for the REML likelihood other than that?), so then it is
really a question of whether for a given pair of random effect models and
the same data the likelihood ratio test statistic  changes across analysis
methods. Unless for some reason you are comparing two random effect models
fitted with different routines (one of which is asreml-r).

Ron.


__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] mixed Model: asreml-r versus nmle,lme4 or coxme

2017-05-19 Thread Brigitte Mangin
Thank's  Thierry, but as i mentioned, it is not a constant depending only of 
the data, since with the same observed trait:


the difference (between asreml and R packages) is equal to 29.40 in the model 
with a fixed effect (Type)

and the difference is equal to 32.16 in the model with only mu.


And that, it is a big concern.



De : Thierry Onkelinx <thierry.onkel...@inbo.be>
Envoy� : vendredi 19 mai 2017 16:40
� : Brigitte Mangin
Cc : r-h...@lists.r-project.org
Objet : Re: [R] mixed Model: asreml-r versus nmle,lme4 or coxme

Dear Brigitte,

Maybe because the log likelihood is calculated differently. Note that the log 
likelihood contains a constant which only depends on the data. So one can 
safely omit that part for model comparison, assuming that use you the same 
formula to calculate the likelihood for all models.

Best regards,

ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and 
Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium

To call in the statistician after the experiment is done may be no more than 
asking him to perform a post-mortem examination: he may be able to say what the 
experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not ensure 
that a reasonable answer can be extracted from a given body of data. ~ John 
Tukey

2017-05-19 14:30 GMT+02:00 Brigitte Mangin 
<brigitte.man...@inra.fr<mailto:brigitte.man...@inra.fr>>:



Hi,

Did somebody know why asreml does not provide the same REML loglikehood  as 
coxme, lme4 or lmne.
Here is a simple example showing the differences:


###
library(lme4)
library(coxme)
library(asreml)
library(nlme)

data(ergoStool, package="nlme") # use a data set from nlme

fit1 <- lmekin(effort ~ Type+(1|Subject), data=ergoStool,method="REML")
fit1$loglik #-60.56539
fit2 <- lmer(effort ~ Type+(1|Subject), data=ergoStool,REML=TRUE)
logLik(fit2) #'log Lik.' -60.56539 (df=6)
fit3<-asreml(fixed=effort ~ Type,random=~Subject,data=ergoStool,
na.method.X="omit",na.method.Y="omit")
fit3$loglik #-31.15936
fit4<-lme(effort ~ Type,random=~1|Subject, data = ergoStool,method="REML")
fit4$logLik  #-60.56539

fit1 <- lmekin(effort ~ (1|Subject), data=ergoStool,method="REML")
fit1$loglik #-78.91898
fit2 <- lmer(effort ~ (1|Subject), data=ergoStool,REML=TRUE)
logLik(fit2) #'log Lik.' -78.91898 (df=3)
fit3<-asreml(fixed=effort ~ 1,random=~Subject,data=ergoStool,
na.method.X="omit",na.method.Y="omit")
fit3$loglik #-46.75614
fit4<-lme(effort ~ 1,random=~1|Subject, data = ergoStool,method="REML")
fit4$logLik #-78.91898



If it was just a constant value between the two models (with or without the 
fixed effect) it would not be important. But it is not.
I checked that the variance component estimators were equal.

Thanks



[[alternative HTML version deleted]]

__
R-help@r-project.org<mailto:R-help@r-project.org> mailing list -- To 
UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

[R] mixed Model: asreml-r versus nmle,lme4 or coxme

2017-05-19 Thread Brigitte Mangin



Hi,

Did somebody know why asreml does not provide the same REML loglikehood  as 
coxme, lme4 or lmne.
Here is a simple example showing the differences:


###
library(lme4)
library(coxme)
library(asreml)
library(nlme)

data(ergoStool, package="nlme") # use a data set from nlme

fit1 <- lmekin(effort ~ Type+(1|Subject), data=ergoStool,method="REML")
fit1$loglik #-60.56539
fit2 <- lmer(effort ~ Type+(1|Subject), data=ergoStool,REML=TRUE)
logLik(fit2) #'log Lik.' -60.56539 (df=6)
fit3<-asreml(fixed=effort ~ Type,random=~Subject,data=ergoStool,
na.method.X="omit",na.method.Y="omit")
fit3$loglik #-31.15936
fit4<-lme(effort ~ Type,random=~1|Subject, data = ergoStool,method="REML")
fit4$logLik  #-60.56539

fit1 <- lmekin(effort ~ (1|Subject), data=ergoStool,method="REML")
fit1$loglik #-78.91898
fit2 <- lmer(effort ~ (1|Subject), data=ergoStool,REML=TRUE)
logLik(fit2) #'log Lik.' -78.91898 (df=3)
fit3<-asreml(fixed=effort ~ 1,random=~Subject,data=ergoStool,
na.method.X="omit",na.method.Y="omit")
fit3$loglik #-46.75614
fit4<-lme(effort ~ 1,random=~1|Subject, data = ergoStool,method="REML")
fit4$logLik #-78.91898



If it was just a constant value between the two models (with or without the 
fixed effect) it would not be important. But it is not.
I checked that the variance component estimators were equal.

Thanks



[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.