Dear all. I am running this model but I get an error. 

> gmm1a <- glmer(workstatus ~ 1+(1|cntry) + (1|cntry:region),family=binomial, 
>data=retirement2)
Warning in region:cntry :
  numerical expression has 7011 elements: only the first used
Warning in region:cntry :
  numerical expression has 7011 elements: only the first used
Warning in inherits(x, "factor") : NAs introduced by coercion
Error in region:cntry : NA/NaN argument

 


if I run a slightly different model, then it works

> gmm1a <- glmer(workstatus ~ 1+(1|cntry) + (1|region),family=binomial, 
>data=retirement2)


If I run the command below, it seems that there are no missing data either in 
the cntry or in the region variables. Can anyone offer any hints please?

sum(table(retirement2$region, retirement2$cntry))



Dr. Iasonas Lamprianou
Department of Social and Political Sciences
University of Cyprus




________________________________
From: "r-sig-mixed-models-request@r-project.org" 
<r-sig-mixed-models-request@r-project.org>
To: r-sig-mixed-models@r-project.org
Sent: Wed, 1 June, 2011 22:40:11
Subject: R-sig-mixed-models Digest, Vol 54, Issue 2

Send R-sig-mixed-models mailing list submissions to
    r-sig-mixed-models@r-project.org

To subscribe or unsubscribe via the World Wide Web, visit
    https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
or, via email, send a message with subject or body 'help' to
    r-sig-mixed-models-request@r-project.org

You can reach the person managing the list at
    r-sig-mixed-models-owner@r-project.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of R-sig-mixed-models digest..."


Today's Topics:

   1. Re: ACF for lmer (David Duffy)
   2. Likelihood ratio statistics when one model is probably
      overfitting (Petar Milin)
   3. (no subject) (Adewale, Adeniyi)


----------------------------------------------------------------------

Message: 1
Date: Wed, 1 Jun 2011 21:45:22 +1000 (EST)
From: "David Duffy" <davidD@qimr.edu.au>
To: <John.Morrongiello@csiro.au>
Cc: r-sig-mixed-models@r-project.org
Subject: Re: [R-sig-ME] ACF for lmer
Message-ID: <Pine.LNX.4.64.1106012128150.17678@orpheus.qimr.edu.au>
Content-Type: TEXT/PLAIN;    format=flowed;    charset="US-ASCII"

On Wed, 1 Jun 2011, John.Morrongiello@csiro.au wrote:

> Hi Is there a way to investigate auto correlation in a model fit with 
> lmer, similar to the ACF.lme function for lme models?

An ugly hack would be to use the pedigreemm package (you could put your 
series in as chains of parents and offspring, and compare to a model where
the members of the "pedigree" share a single random effect).

Cheers, David Duffy.

-- 
| David Duffy (MBBS PhD)                                         ,-_|\
| email: davidD@qimr.edu.au  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



------------------------------

Message: 2
Date: Wed, 01 Jun 2011 14:23:21 +0200
From: Petar Milin <pmilin@ff.uns.ac.rs>
To: R-SIG-LMER <r-sig-mixed-models@r-project.org>
Subject: [R-sig-ME] Likelihood ratio statistics when one model is
    probably    overfitting
Message-ID: <4DE62F39.4020702@ff.uns.ac.rs>
Content-Type: text/plain; charset=UTF-8; format=flowed

Hello ALL,
Sorry for being stubborn, but I would really like to clarify one issue 
that remained open after my latest post.

In brief, I started with a model that had vector-valued random effect, 
like (1+A|item). Unfortunately, it got perfect correlations between some 
levels of A
(the variance covariance matrix of the random effects is singular or 
nearly singular). Then, I got advice to go for scalar random effect, 
like (1|A+item). Finally, I got another advice to compare two models -- 
vector-valued and scalar -- by means of likelihood ratio.

My question is: whether one should compare model that has (nearly) 
singular variance/covariance matrix of random effects at all? Using 
fit-statistics of a model that has "wrong fit" (overfit) seems 
unnecessary, if not odd. (Moreover, I secretly did that, and the 
vector-valued won!)

Please, can anyone more experienced clarify this?

Thanks,
PM



------------------------------

Message: 3
Date: Wed, 1 Jun 2011 13:59:51 -0400
From: "Adewale, Adeniyi" <adeniyi_adewale@merck.com>
To: <R-SIG-Mixed-Models@r-project.org>
Subject: [R-sig-ME] (no subject)
Message-ID:
    <B57FFB70C5FC30469028486901C6B67301F94793@usctmx1158.merck.com>
Content-Type: text/plain; charset="us-ascii"

Does anyone know how to fit a repeated measures model in R with
unstructured variance-covariance matrix? Below is a SAS equivalent of
the model I am interested in:

proc mixed data=longdat;
    class alloc week;
    model y =  week  trt2wk1 trt2wk2 trt2wk3 trt2wk4/ddfm=kr covb
corrb solution;
    repeated week/type=un subject=alloc;
run;

I was able to fit a simpler model with compound symmetric
variance-covariance structure (or equivalently, for positively
correlated data, a simple random intercept model) using the lme function
in the nlme package:

fit <- lme(y ~ week + trt2wk1 + trt2wk2 + trt2wk3 +
trt2wk4,data=longdat,random=~1|alloc)

My example data is attached.
<<longdat.txt>> 
Thanks.

Adeniyi Adewale

Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates Direct contact information
for affiliates is available at 
http://www.merck.com/contact/contacts.html) that may be confidential,
proprietary copyrighted and/or legally privileged. It is intended solely
for the use of the individual or entity named on this message. If you are
not the intended recipient, and have received this message in error,
please notify us immediately by reply e-mail and then delete it from 
your system.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: longdat.txt
URL: 
<https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20110601/29b10545/attachment.txt>


------------------------------

_______________________________________________
R-sig-mixed-models mailing list
R-sig-mixed-models@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models


End of R-sig-mixed-models Digest, Vol 54, Issue 2
*************************************************

	[[alternative HTML version deleted]]


