[R-sig-ME] suggestions for estimating confidence intervals with only 1.5 GB of ram?

Darren Norris doon75 at hotmail.com
Fri Apr 1 02:45:44 CEST 2011

Thanks Andrew,
Yes I have checked,
Yes autocorrelation does exist
and yes in this model variance of 0.00000 but this is only one part of a 
more general analysis that I am doing.
sorry should have explained that before .....

As I explained originally I am not a statistician and will not be publishing 
in a statistical journal.
Unfortunately I cannot "cook my own" and expect everyone to believe me.
In an ideal world I would like to able to cite functions and packages 
developed by those who know what they are doing.

I am hoping more experienced and infinitely more knowledgeable heads can 
share a solution...
which will enable me to publish a clear, justifiable method and reproducible 
Best wishes,

-----Original Message----- 
From: Andrew Miles
Sent: Thursday, March 31, 2011 9:22 PM
To: Darren Norris
Cc: David Duffy ; r-sig-mixed-models at r-project.org
Subject: Re: [R-sig-ME] suggestions for estimating confidence intervals with 
only 1.5 GB of ram?

I believe what David was pointing out was that your random effect for
yearMonth has a variance of 0.000000.  That suggests to me that there
is no yearMonth level variation for your model to explain - i.e. you
don't need to use a mixed model but can use OLS or GLM.

As for the autocorrelation, have you checked your data for
autocorrelation using a test like the Durban-Watson test (dwtest
{lmtest})?  If so and it is a problem, you might want to use an OLS or
GLM model with corrected standard errors, which can be found in the
sandwich package (vcovHAC function).

If you want confidence intervals and have some time to kill,
bootstrapping is probably a pretty good approach.

Andrew Miles

On Mar 31, 2011, at 8:07 PM, Darren Norris wrote:

> Many thanks for the reply David,
> I am probably being thick - but it is not the estimates for random 
> effects that I am interested in.....
> I am trying to get the confidence intervals around the predicted  values 
> from the fixed effects.
> for example:
> The data is available at this link as a R workspace   "DarrensSpace.RData" 
> (size is approx 70 kb):
> http://cid-f0a9fa3480208398.office.live.com/self.aspx/lmeData/DarrensSpace.RData
> ####   the random effect (1|yearMonth) is used to model serial  temporal 
> autocorrelation,
> ####   data is  observational & ecological so unbalanced
> #### "yall " is abundance of the turtle species of interest
> library("lme4")
> fmer2f<-lmer(yall~yearSeason+sun+total_precip_trip+mean_temp_trip 
> +surveyArea+obscat+hour_period+(1|yearMonth),REML=FALSE,data=df.p)
> library(AICcmodavg) # another very helpful library
> p.fmer2f<-predictSE.mer(fmer2f, df.p,type="response")
> #### I can then plot and see predicted values and SE if I wanted,  for 
> example....
> plot(df.p$yall) #observed values
> lines(p.fmer2f$fit) #predicted response
> How can I calculate / approximate 95 CI intervals to go around this  line?
> Many thanks again!
> Darrren
> -----Original Message----- From: David Duffy
> Sent: Thursday, March 31, 2011 8:42 PM
> To: Darren Norris
> Cc: r-sig-mixed-models at r-project.org
> Subject: Re: [R-sig-ME] suggestions for estimating confidence  intervals 
> with only 1.5 GB of ram?
> On Thu, 31 Mar 2011, Darren Norris wrote:
>> I would like to obtain (then plot) the fitted (?predicted - sorry  never 
>> know correct term) response values and in an ideal world 95%  confidence 
>> (or prediction) intervals for a lmer model.
> Possibly I'm being obtuse, but in your fmer2f model has
> Random effects:
> Groups    Name        Variance Std.Dev.
> yearMonth (Intercept) 0.000000 0.00000  <----
> Residual              0.096815 0.31115
> Number of obs: 333, groups: yearMonth, 50
> Cheers, David Duffy.
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

More information about the R-sig-mixed-models mailing list