Quantcast

VarCorr procedure from lme4

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

VarCorr procedure from lme4

dkStevens
Folks

In trying to use lmer for a hierarchical model, I encountered the
following message:


Error in UseMethod("VarCorr") :
   no applicable method for 'VarCorr' applied to an object of class "mer"

foo.mer <- lmer(y ~ TP + (TP|M),data=joe.q)

 > head(joe.q[,1:5])
   TP   M AB Trt        y
1  1 Jan  A  NN 19.20002
2  1 Jan  A  NN 19.06378
3  1 Jan  A  NN 21.36292
4  1 Jan  A  NN 16.85191
5  1 Jan  A   N 17.89363
6  1 Jan  A   N 15.53853
I tried this through the display(foo.mer) from arm and by VarCorr(foo.mer)
My understanding is the VarCorr was essentially designed to work with
'mer' objects. Am I wrong about this?  The lmer procedure seemed to work
fine

--
David K Stevens, P.E., Ph.D., Professor
Civil and Environmental Engineering
Utah Water Research Laboratory
8200 Old Main Hill
Logan, UT  84322-8200
435 797 3229 - voice
435 797 1363 - fax
[hidden email]




        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: VarCorr procedure from lme4

Doran, Harold
Can you give sessionInfo()? It is working fine for me.

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On
> Behalf Of David Stevens
> Sent: Tuesday, May 01, 2012 2:38 PM
> To: [hidden email]
> Subject: [R] VarCorr procedure from lme4
>
> Folks
>
> In trying to use lmer for a hierarchical model, I encountered the
> following message:
>
>
> Error in UseMethod("VarCorr") :
>    no applicable method for 'VarCorr' applied to an object of class "mer"
>
> foo.mer <- lmer(y ~ TP + (TP|M),data=joe.q)
>
>  > head(joe.q[,1:5])
>    TP   M AB Trt        y
> 1  1 Jan  A  NN 19.20002
> 2  1 Jan  A  NN 19.06378
> 3  1 Jan  A  NN 21.36292
> 4  1 Jan  A  NN 16.85191
> 5  1 Jan  A   N 17.89363
> 6  1 Jan  A   N 15.53853
> I tried this through the display(foo.mer) from arm and by VarCorr(foo.mer)
> My understanding is the VarCorr was essentially designed to work with
> 'mer' objects. Am I wrong about this?  The lmer procedure seemed to work
> fine
>
> --
> David K Stevens, P.E., Ph.D., Professor
> Civil and Environmental Engineering
> Utah Water Research Laboratory
> 8200 Old Main Hill
> Logan, UT  84322-8200
> 435 797 3229 - voice
> 435 797 1363 - fax
> [hidden email]
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] 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.

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: VarCorr procedure from lme4

Walmes Zeviani-3
It could be a bad coexistence between packages in the same R session. Are
you using nlme and/or doBy packages too?

Bests.
Walmes.

==========================================================================
Walmes Marques Zeviani
LEG (Laboratório de Estatística e Geoinformação, 25.450418 S, 49.231759 W)
Departamento de Estatística - Universidade Federal do Paraná
fone: (+55) 41 3361 3573
VoIP: (3361 3600) 1053 1173
e-mail: [hidden email]
twitter: @walmeszeviani
homepage: http://www.leg.ufpr.br/~walmes
linux user number: 531218
==========================================================================

        [[alternative HTML version deleted]]


______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: VarCorr procedure from lme4

dkStevens
Yes - I also have nlme.  Bad juju?

David

On 5/1/2012 1:32 PM, Walmes Zeviani wrote:

> It could be a bad coexistence between packages in the same R session. Are
> you using nlme and/or doBy packages too?
>
> Bests.
> Walmes.
>
> ==========================================================================
> Walmes Marques Zeviani
> LEG (Laboratório de Estatística e Geoinformação, 25.450418 S, 49.231759 W)
> Departamento de Estatística - Universidade Federal do Paraná
> fone: (+55) 41 3361 3573
> VoIP: (3361 3600) 1053 1173
> e-mail: [hidden email]
> twitter: @walmeszeviani
> homepage: http://www.leg.ufpr.br/~walmes
> linux user number: 531218
> ==========================================================================
>
> [[alternative HTML version deleted]]
>
>
>
> ______________________________________________
> [hidden email] 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.
--
David K Stevens, P.E., Ph.D., Professor
Civil and Environmental Engineering
Utah Water Research Laboratory
8200 Old Main Hill
Logan, UT  84322-8200
435 797 3229 - voice
435 797 1363 - fax
[hidden email]




        [[alternative HTML version deleted]]


______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: VarCorr procedure from lme4

dkStevens
That was it - detaching 'nlme' was the trick. Thanks Walmes and the rest.

David

On 5/1/2012 7:47 PM, David Stevens wrote:

> Yes - I also have nlme.  Bad juju?
>
> David
>
> On 5/1/2012 1:32 PM, Walmes Zeviani wrote:
>> It could be a bad coexistence between packages in the same R session. Are
>> you using nlme and/or doBy packages too?
>>
>> Bests.
>> Walmes.
>>
>> ==========================================================================
>> Walmes Marques Zeviani
>> LEG (Laboratório de Estatística e Geoinformação, 25.450418 S, 49.231759 W)
>> Departamento de Estatística - Universidade Federal do Paraná
>> fone: (+55) 41 3361 3573
>> VoIP: (3361 3600) 1053 1173
>> e-mail: [hidden email]
>> twitter: @walmeszeviani
>> homepage: http://www.leg.ufpr.br/~walmes
>> linux user number: 531218
>> ==========================================================================
>>
>> [[alternative HTML version deleted]]
>>
>>
>>
>> ______________________________________________
>> [hidden email] 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.
>
>
> ______________________________________________
> [hidden email] 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.
--
David K Stevens, P.E., Ph.D., Professor
Civil and Environmental Engineering
Utah Water Research Laboratory
8200 Old Main Hill
Logan, UT  84322-8200
435 797 3229 - voice
435 797 1363 - fax
[hidden email]




        [[alternative HTML version deleted]]


______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: VarCorr procedure from lme4

nutterb
I've run into this situation and have been able to prevent problems by using

> lme4::VarCor(...)

  Benjamin Nutter |  Biostatistician     |  Quantitative Health Sciences
  Cleveland Clinic    |  9500 Euclid Ave.  |  Cleveland, OH 44195  | (216) 445-1365


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of David Stevens
Sent: Tuesday, May 01, 2012 9:58 PM
To: [hidden email]
Subject: Re: [R] VarCorr procedure from lme4

That was it - detaching 'nlme' was the trick. Thanks Walmes and the rest.

David

On 5/1/2012 7:47 PM, David Stevens wrote:

> Yes - I also have nlme.  Bad juju?
>
> David
>
> On 5/1/2012 1:32 PM, Walmes Zeviani wrote:
>> It could be a bad coexistence between packages in the same R session.
>> Are you using nlme and/or doBy packages too?
>>
>> Bests.
>> Walmes.
>>
>> =====================================================================
>> =====
>> Walmes Marques Zeviani
>> LEG (Laboratório de Estatística e Geoinformação, 25.450418 S,
>> 49.231759 W) Departamento de Estatística - Universidade Federal do
>> Paraná
>> fone: (+55) 41 3361 3573
>> VoIP: (3361 3600) 1053 1173
>> e-mail: [hidden email]
>> twitter: @walmeszeviani
>> homepage: http://www.leg.ufpr.br/~walmes linux user number: 531218
>> =====================================================================
>> =====
>>
>> [[alternative HTML version deleted]]
>>
>>
>>
>> ______________________________________________
>> [hidden email] 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.
>
>
> ______________________________________________
> [hidden email] 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.

--
David K Stevens, P.E., Ph.D., Professor
Civil and Environmental Engineering
Utah Water Research Laboratory
8200 Old Main Hill
Logan, UT  84322-8200
435 797 3229 - voice
435 797 1363 - fax
[hidden email]




        [[alternative HTML version deleted]]


===================================

 Please consider the environment before printing this e-mail

Cleveland Clinic is ranked one of the top hospitals
in America by U.S.News & World Report (2010).  
Visit us online at http://www.clevelandclinic.org for
a complete listing of our services, staff and
locations.


Confidentiality Note:  This message is intended for use\...{{dropped:13}}

______________________________________________
[hidden email] 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.
Loading...