
On 22 Jun 2009, at 11:23, Toni Hernandez-Matias wrote:
>> (2) how can I extract the deviance value of the printed table  
>> given by the
>> 'verbose' option? I mean extract, as a R object. I need this  
>> because I am
>> performing a large set of models and I consider those with better  
>> aic.

I had a pretty close look at the mer structure and I can't find  
anything that might be the number of iterations taken to reach  
convergence.

Like Toni, I would find this information extremely useful. My dataset  
is large and contains many missing values, so I'm doing a trawl of  
simple models to reduce the number of fixed effects going into  
complex models. At present, I'm setting up a loop to fit ~50 models  
in sequence and spit the results to a text file.  My problem is that  
any 'false convergence' warnings appear only after the last model has  
been fit, so I have to trawl through all the verbose output to work  
out which might be problematic.

It would be really useful to have the full trace from 'verbose=T'  
included as an extra slot in mer. Otherwise, just the number of  
iterations would be helpful too.

Best wishes, Nick



On 22 Jun 2009, at 11:23, Toni Hernandez-Matias wrote:

> One comment: in the models I am considering some predictor  
> variables also
> vary anually:
>
> occupancy_ij ~ predictor1_ij  + predictor2_i + (1|territoryID_i) +
> (1|year_j)
>
>
> On Mon, Jun 22, 2009 at 5:37 PM, Andrew J Tyre  
> <atyre2@unlnotes.unl.edu>wrote:
>
>> Toni,
>>
>> I assume that your predictor variables vary by territory, and that  
>> your
>> random effect is applied to the intercept, like this
>>
>> occupancy_ij ~ predictor1_i  + predictor2_i + (1|territoryID_i) +
>> (1|year_j)
>>
>> in that case, the territoryID random effect is "competing" to explain
>> variation in occupancy between territories with predictors1 and 2.  
>> Hence
>> the failure to converge.
>>
>> A better question to ask yourself is this: is the probability that a
>> territory is occupied this year different depending on whether the
>> territory was occupied last year? If yes, then you have  
>> AUTOCORRELATION,
>> and that has to be handled differently - a random effect on  
>> territoryID
>> influences the probability of the territory being occupied, as do the
>> predictor variables, but that model still assumes that occupancy is
>> independent from year to year. I do not know how to accomadate
>> autocorrelation in a binomial model in lmer; in general, it isn't
>> something that is easy to do.
>>
>> 1) You cannot use the estimates from lmer if it hasn't converged,  
>> in my
>> opinion.
>>
>> 2) not sure ... looking forward to an answer from greater gurus.
>>
>> hth,
>>
>> Drew Tyre
>>
>> School of Natural Resources
>> University of Nebraska-Lincoln
>> 416 Hardin Hall, East Campus
>> 3310 Holdrege Street
>> Lincoln, NE 68583-0974
>>
>> phone: +1 402 472 4054
>> fax: +1 402 472 2946
>> email: atyre2@unl.edu
>> http://snr.unl.edu/tyre
>> http://aminpractice.blogspot.com
>>
>>
>>
>> Toni Hernandez-Matias <ahmatias@gmail.com>
>> Sent by: r-sig-mixed-models-bounces@r-project.org
>> 06/22/2009 09:54 AM
>>
>> To
>> R-SIG-Mixed-Models@r-project.org
>> cc
>>
>> Subject
>> [R-sig-ME] problems with 'false convergence' in lmer
>>
>>
>>
>>
>>
>>
>> Dear all,
>>
>> I am analyzing a data set with the 'lmer' function  
>> (lme4_0.999375-28).
>> The dependent variable is binary: occupation status of a breeding  
>> site by
>> a
>> bird species (territory ocupied vs. non-ocupied).
>> There are clustered observations: observations of the same  
>> territory for
>> several years and observations of different territories in the  
>> same year.
>> So
>> I considered two random factors: territory identity and year.
>> I considered several predictors which are standardized.
>> I am using aic values to obtain the final model.
>>
>> The problem is that the program generates the warning message in  
>> most of
>> the
>> fitted models:
>> In mer_finalize(ans) : false convergence (8)
>>
>> This probably happens because many territories are either occupied or
>> non-occupied for many or all years in the study. [there are no  
>> problems
>> when
>> I include the random factor year in the formula, and I do not  
>> include the
>> random factor territory identity]
>>
>> I added the  option 'verbose=TRUE', and  I found that the printed  
>> value of
>> deviance does not match with that saved by the model object (I  
>> extract it
>> using 'attr(summary(nameofthemodel),"AIC")$AIC').
>>
>> My questions are:
>>
>> (1) are the results (estimated parameters and se) of the fitted model
>> correct? Can I use them?
>>
>> (2) how can I extract the deviance value of the printed table  
>> given by the
>> 'verbose' option? I mean extract, as a R object. I need this  
>> because I am
>> performing a large set of models and I consider those with better  
>> aic.
>>
>> Thank you very much in advance,
>>
>>
>> Toni Hernandez
>>
>> --
>> *********************************************************
>>
>> Antonio Hernandez Matias
>>
>> Departament de Biologia Animal (Vertebrats)
>> Facultat de Biologia
>> Universitat de Barcelona
>>
>> ***********************************************************
>>
>>                  [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-mixed-models@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>>
>>
>>
>
>
> -- 
> *********************************************************
>
> Antonio Hernandez Matias
>
> Departament de Biologia Animal (Vertebrats)
> Facultat de Biologia
> Universitat de Barcelona
> Av. Diagonal, 645
> Barcelona      08028
> Spain
> Telephone: +34-934035857
> FAX: +34-934035740
> e-mail: ahernandezmatias@ub.edu
>
> ***********************************************************
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models


Nick Isaac
Macroecologist
Centre for Ecology & Hydrology
Maclean Building
Benson Lane
Crowmarsh Gifford
Wallingford
Oxfordshire
OX10 8BB
UK

W: www.brc.ac.uk/staff/nick_isaac.htm
T: 01491 692212
njbisaac@gmail.com





	[[alternative HTML version deleted]]


