Re: [R] Robust or Sandwich estimates in lmer2

2007-09-20 Thread David Duffy
Abdus Sattar <[EMAIL PROTECTED]> asked:

>
> I am trying to find the robust (or sandwich) estimates of the standard
> error of fixed effects parameter estimates using the package "lmer2".
>
Others have already pointed out that this is not implemented in lmer2.

You could try a delete-n jackknife, which you would have to implement
yourself. An ordinary delete-1 jackknife does not work for
clustered/correlated data.  This would also give you bias-corrected
point estimates.  I should add that, in the limited simulations I have
done (for Gaussian mixed model analysis of pedigree data), the jackknife
standard errors seemed a bit conservative (too big).

David Duffy.
-- 
| David Duffy (MBBS PhD) ,-_|\
| email: [EMAIL PROTECTED]  ph: INT+61+7+3362-0217 fax: -0101  / *
| Epidemiology Unit, Queensland Institute of Medical Research   \_,-._/
| 300 Herston Rd, Brisbane, Queensland 4029, Australia  GPG 4D0B994A v

__
R-help@r-project.org mailing list
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] Robust or Sandwich estimates in lmer2

2007-09-19 Thread Abdus Sattar
Hi Doran, 

My interests to estimate fixed effects parameters in a mixed model (not the 
random effects parameters) and, in addition, in the model there are some 
nuisace parameters. For this estimation I am using pseudo-maximum likelihood 
methods. First I am estimating nuisance parameters then using these estimates 
in my likelihood function to get the estimates of fixed effects parameters 
using lmer2. Therefore, to get the correct estimates of the standard errors, I 
need robust (or sandwich) estiamtes of the SE. Thank you and thanks to Thomas 
his remarks, 

Sattar


- Original Message 
From: Thomas Lumley <[EMAIL PROTECTED]>
To: "Doran, Harold" <[EMAIL PROTECTED]>
Cc: Sundar Dorai-Raj <[EMAIL PROTECTED]>; Abdus Sattar <[EMAIL PROTECTED]>; 
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, September 19, 2007 1:13:20 PM
Subject: Re: [R] Robust or Sandwich estimates in lmer2


On Wed, 19 Sep 2007, Doran, Harold wrote:

> This has come up before and I'll again ask the question "why would you
> want robust standard errors in lmer"?

And I'll again answer: using lmer() does not automatically guarantee correct 
model specification, either for the correlation structure or for the marginal 
variance.

  -thomas


Thomas LumleyAssoc. Professor, Biostatistics
[EMAIL PROTECTED]University of Washington, Seattle


  


ttp://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
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] Robust or Sandwich estimates in lmer2

2007-09-19 Thread Thomas Lumley
On Wed, 19 Sep 2007, Doran, Harold wrote:

> This has come up before and I'll again ask the question "why would you
> want robust standard errors in lmer"?

And I'll again answer: using lmer() does not automatically guarantee correct 
model specification, either for the correlation structure or for the marginal 
variance.

  -thomas


Thomas Lumley   Assoc. Professor, Biostatistics
[EMAIL PROTECTED]   University of Washington, Seattle

__
R-help@r-project.org mailing list
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] Robust or Sandwich estimates in lmer2

2007-09-19 Thread Doran, Harold
This has come up before and I'll again ask the question "why would you
want robust standard errors in lmer"? Traditional econometric thinking
suggests that there is model mispecification if OLS is used and there is
a violation to the assumption of independence. So, one may still get the
point estimates via OLS but then get robust standard errors. This makes
sense.

But, mixed models are designed to account for violations to the iid
assumption via correctly specified random effects. So, if your lmer
model is correctly specified, the standard errors should yield an
accurate estimate of the true sampling variance.

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Sundar Dorai-Raj
> Sent: Wednesday, September 19, 2007 11:42 AM
> To: Abdus Sattar
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: [R] Robust or Sandwich estimates in lmer2
> 
> Abdus Sattar said the following on 9/19/2007 7:03 AM:
> > Dear R-Users:
> > 
> > I am trying to find the robust (or sandwich) estimates of 
> the standard error of fixed effects parameter estimates using 
> the package "lmer2". In model-1, I used "robust=TRUE" on the 
> other, in model-2, I used "robust=FALSE". Both models giving 
> me the same estimates. So my question is, does the robust 
> option works in lmer2 to get the robust estimates of the 
> standard error? If anybody could offer me a suggestion I 
> would greatly appreciate it. Thank you.  
> > 
> > Model-1:
> > 
> >> p.mle<-lmer2(ddimer~race+steroid+psi+sofa+apache + 
> (apache|subject), 
> >> method="ML", data=final, robust=TRUE, cluster="id", 
> weights=final$w)
> >> beta=fixef(p.mle)
> >> Vcov=vcov(p.mle, useScale=FALSE)
> >> se=sqrt(diag(Vcov))
> >> beta
> >  (Intercept) race  steroid  psi 
> sofa   apache 
> >  5.826489820 -0.001920670 -0.242040171  0.005293996  0.075468340  
> > 0.009245152
> >> se
> > [1] 0.108325229 0.058921371 0.055975547 0.001285687 0.018119089 
> > 0.002559902
> > 
> > Model-2:
> > 
> >> p.mle<-lmer2(ddimer~race+steroid+psi+sofa+apache + 
> (apache|subject), 
> >> method="ML", data=final, robust=FALSE, cluster="id", 
> weights=final$w)
> >> beta=fixef(p.mle)
> >> Vcov=vcov(p.mle, useScale=FALSE)
> >> se=sqrt(diag(Vcov))
> >> beta
> >  (Intercept) race  steroid  psi 
> sofa   apache 
> >  5.826489820 -0.001920670 -0.242040171  0.005293996  0.075468340  
> > 0.009245152
> >> se
> > [1] 0.108325229 0.058921371 0.055975547 0.001285687 0.018119089 
> > 0.002559902
> > 
> > 
> > Best Regards,
> > 
> > Sattar
> > 
> > 
> 
> The help page to ?lmer2 in the lme4 package makes no mention 
> of "cluster" or "robust" arguments. To me, that would mean 
> these arguments are ignored.
> 
> HTH,
> 
> --sundar
> 
> __
> R-help@r-project.org mailing list
> 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-help@r-project.org mailing list
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] Robust or Sandwich estimates in lmer2

2007-09-19 Thread Sundar Dorai-Raj
Abdus Sattar said the following on 9/19/2007 7:03 AM:
> Dear R-Users:
> 
> I am trying to find the robust (or sandwich) estimates of the standard error 
> of fixed effects parameter estimates using the package "lmer2". In model-1, I 
> used "robust=TRUE" on the other, in model-2, I used "robust=FALSE". Both 
> models giving me the same estimates. So my question is, does the robust 
> option works in lmer2 to get the robust estimates of the standard error? If 
> anybody could offer me a suggestion I would greatly appreciate it. Thank you. 
>  
> 
> Model-1:
> 
>> p.mle<-lmer2(ddimer~race+steroid+psi+sofa+apache + (apache|subject), 
>> method="ML", data=final, robust=TRUE, cluster="id", weights=final$w)
>> beta=fixef(p.mle)
>> Vcov=vcov(p.mle, useScale=FALSE)
>> se=sqrt(diag(Vcov))
>> beta
>  (Intercept) race  steroid  psi sofa   apache 
>  5.826489820 -0.001920670 -0.242040171  0.005293996  0.075468340  0.009245152 
>> se
> [1] 0.108325229 0.058921371 0.055975547 0.001285687 0.018119089 0.002559902
> 
> Model-2:
> 
>> p.mle<-lmer2(ddimer~race+steroid+psi+sofa+apache + (apache|subject), 
>> method="ML", data=final, robust=FALSE, cluster="id", weights=final$w)
>> beta=fixef(p.mle)
>> Vcov=vcov(p.mle, useScale=FALSE)
>> se=sqrt(diag(Vcov))
>> beta
>  (Intercept) race  steroid  psi sofa   apache 
>  5.826489820 -0.001920670 -0.242040171  0.005293996  0.075468340  0.009245152 
>> se
> [1] 0.108325229 0.058921371 0.055975547 0.001285687 0.018119089 0.002559902
> 
> 
> Best Regards, 
> 
> Sattar
> 
> 

The help page to ?lmer2 in the lme4 package makes no mention of 
"cluster" or "robust" arguments. To me, that would mean these arguments 
are ignored.

HTH,

--sundar

__
R-help@r-project.org mailing list
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.