Re: [R] output too large to display all

2009-07-07 Thread Christine Griffiths

Dear All

Thanks for the suggestions. Mark's suggestion to specify corr=FALSE did 
the job and removed the reams of correlations that were being outputted 
from the model and using up all the output space.


Thanks
Christine

--On 06 July 2009 12:44 -0600 Lyman, Mark mark.ly...@atk.com wrote:


Take a look at the print method for the mer class, class?mer. I believe
setting the correlation argument to FALSE will give you what you want.
See the examples.

Mark Lyman, Statistician
Engineering Systems  Integration, ATK


Hi R Users,

Hopefully a very simple solution, but I am stumped nevertheless. I am
running glmer in which the output is too large so that not all the
correlations are displayed. I expanded the max.print as recommended on

this

website. However, this still does not allow me to see the relevant
information regarding the model fit (AIC etc), random and fixed

effects. I

have not been able to find any similar posts.

I would be very grateful if someone could specify what I need to state

in

order to view all the results generated from the model.

Many thanks in advance,
Christine

__
R-help at 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.


[R] output too large to display all

2009-07-06 Thread Christine Griffiths

Hi R Users,

Hopefully a very simple solution, but I am stumped nevertheless. I am 
running glmer in which the output is too large so that not all the 
correlations are displayed. I expanded the max.print as recommended on this 
website. However, this still does not allow me to see the relevant 
information regarding the model fit (AIC etc), random and fixed effects. I 
have not been able to find any similar posts.


I would be very grateful if someone could specify what I need to state in 
order to view all the results generated from the model.


Many thanks in advance,
Christine

__
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] Replacing 0s with NA

2009-06-12 Thread Christine Griffiths

Hello

I have a dataset in which I would like to replace 0s with NAs. There is a 
lot of information on how to replace NAs with 0, but I have struggled to 
find anything with regards to doing the reverse. Any recommendations would 
be great.


Cheers
Christine

__
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] Random effects aov

2009-05-20 Thread Christine Griffiths

Dear All

I have a repeated measures design in which abundance was measured 
repeatedly over 10 months in three treatments (Tortoise A; Tortoise B and 
control) established in 6 blocks, i.e. crossed fixed effects. My original 
design incorporated two tortoises per treatment, however as fieldwork goes 
I ended up losing some animals. Rather than lose a couple of enclosures in 
the analysis and have to do a lmer, I thought I could include tortoise 
weight as an explanatory variable. For my treatments, tortoise weight in 
the control always = 0, while in general Tortoise A is twice as large as 
Tortoise B except when I lost animals. Is this the correct model?


aov(Tel.ab~Tort.W+Treatment*Month+Error(Month/Block))

Or should tortoise weight be nested in Treatment, i.e not included as a 
fixed factor but including the fact that tortoises species may have an 
effect? I am utterly confused now as to whether that should be the case as 
to some extent Tort.W and Treatment are correlated.

Any help would be much appreciated.
Many thanks
Christine


--
Christine Griffiths
School of Biological Sciences
University of Bristol
Woodland Road
Bristol BS8 1UG
Tel: 0117 9287593
Fax 0117 925 7374
christine.griffi...@bristol.ac.uk
http://www.bio.bris.ac.uk/research/mammal/tortoises.html

__
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] Overdispersion using repeated measures lmer

2009-05-19 Thread Christine Griffiths

Thanks. I did try using quasipoisson and a negative binomial error but am
unsure of the degree of overdispersion and whether it is simply due to
missing values. I am investigating to see if I can replace these missing
values so that I can have a balanced orthogonal design and use lme or aov
instead which is easier to interpret. Any ideas on whether it is feasible to
replace missing values for a small dataset with repeated measures? I have 6
blocks with 3 treatments sampled over 10 months. Two blocks are missing one
treatment, albeit a different one. Also any suggestions about how I would go
about this would be much appreciated. 

I am also unsure of whether my random effects (Month|Block) for repeated
measures with random slope and intercept is correct and whether (1|Month) +
(1|Block) represents repeated measures. Any confirmation would be great. 

Cheers
Christine 



Christine Griffiths-2 wrote:
 
 Dear All
 
 I am trying to do a repeated measures analysis using lmer and have a
 number 
 of issues. I have non-orthogonal, unbalanced data.  Count data was
 obtained 
 over 10 months for three treatments, which were arranged into 6 blocks. 
 Treatment is not nested in Block but crossed, as I originally designed an 
 orthogonal, balanced experiment but subsequently lost a treatment from 2 
 blocks. My fixed effects are treatment and Month, and my random effects
 are 
 Block which was repeated sampled.  My model is:
 
 Model-lmer(Count~Treatment*Month+(Month|Block),data=dataset,family=poisson(link=sqrt))
 
 Is this the only way in which I can specify my random effects? I.e. can I 
 specify them as: (1|Block)+(1|Month)?
 
 When I run this model, I do not get any residuals in the error term or 
 estimated scale parameters and so do not know how to check if I have 
 overdispersion. Below is the output I obtained.
 
 Generalized linear mixed model fit by the Laplace approximation
 Formula: Count ~ Treatment * Month + (Month | Block)
Data: dataset
AIC   BIC logLik deviance
  310.9 338.5 -146.4292.9
 Random effects:
  Groups NameVariance   Std.Dev. Corr
  Block  (Intercept) 0.06882396 0.262343
 Month   0.00011693 0.010813 1.000
 Number of obs: 160, groups: Block, 6
 
 Fixed effects:
   Estimate Std. Error z value Pr(|z|)
 (Intercept)   1.624030   0.175827   9.237   2e-16 ***
 Treatment2.Radiata0.150957   0.207435   0.728 0.466777
 Treatment3.Aldabra   -0.005458   0.207435  -0.026 0.979009
 Month-0.079955   0.022903  -3.491 0.000481 ***
 Treatment2.Radiata:Month  0.048868   0.033340   1.466 0.142717
 Treatment3.Aldabra:Month  0.077697   0.033340   2.330 0.019781 *
 ---
 Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
 
 Correlation of Fixed Effects:
 (Intr) Trt2.R Trt3.A Month  T2.R:M
 Trtmnt2.Rdt -0.533
 Trtmnt3.Ald -0.533  0.450
 Month   -0.572  0.585  0.585
 Trtmnt2.R:M  0.474 -0.882 -0.402 -0.661
 Trtmnt3.A:M  0.474 -0.402 -0.882 -0.661  0.454
 
 
 Any advice on how to account for overdispersion would be much appreciated.
 
 Many thanks in advance
 Christine
 
 --
 Christine Griffiths
 School of Biological Sciences
 University of Bristol
 Woodland Road
 Bristol BS8 1UG
 Tel: 0117 9287593
 Fax 0117 925 7374
 christine.griffi...@bristol.ac.uk
 http://www.bio.bris.ac.uk/research/mammal/tortoises.html
 
 __
 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.
 
 

-- 
View this message in context: 
http://www.nabble.com/Overdispersion-using-repeated-measures-lmer-tp23595955p23612349.html
Sent from the R help mailing list archive at Nabble.com.

__
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] Overdispersion using repeated measures lmer

2009-05-18 Thread Christine Griffiths

Dear All

I am trying to do a repeated measures analysis using lmer and have a number 
of issues. I have non-orthogonal, unbalanced data.  Count data was obtained 
over 10 months for three treatments, which were arranged into 6 blocks. 
Treatment is not nested in Block but crossed, as I originally designed an 
orthogonal, balanced experiment but subsequently lost a treatment from 2 
blocks. My fixed effects are treatment and Month, and my random effects are 
Block which was repeated sampled.  My model is:


Model-lmer(Count~Treatment*Month+(Month|Block),data=dataset,family=poisson(link=sqrt))

Is this the only way in which I can specify my random effects? I.e. can I 
specify them as: (1|Block)+(1|Month)?


When I run this model, I do not get any residuals in the error term or 
estimated scale parameters and so do not know how to check if I have 
overdispersion. Below is the output I obtained.


Generalized linear mixed model fit by the Laplace approximation
Formula: Count ~ Treatment * Month + (Month | Block)
  Data: dataset
  AIC   BIC logLik deviance
310.9 338.5 -146.4292.9
Random effects:
Groups NameVariance   Std.Dev. Corr
Block  (Intercept) 0.06882396 0.262343
   Month   0.00011693 0.010813 1.000
Number of obs: 160, groups: Block, 6

Fixed effects:
 Estimate Std. Error z value Pr(|z|)
(Intercept)   1.624030   0.175827   9.237   2e-16 ***
Treatment2.Radiata0.150957   0.207435   0.728 0.466777
Treatment3.Aldabra   -0.005458   0.207435  -0.026 0.979009
Month-0.079955   0.022903  -3.491 0.000481 ***
Treatment2.Radiata:Month  0.048868   0.033340   1.466 0.142717
Treatment3.Aldabra:Month  0.077697   0.033340   2.330 0.019781 *
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Correlation of Fixed Effects:
   (Intr) Trt2.R Trt3.A Month  T2.R:M
Trtmnt2.Rdt -0.533
Trtmnt3.Ald -0.533  0.450
Month   -0.572  0.585  0.585
Trtmnt2.R:M  0.474 -0.882 -0.402 -0.661
Trtmnt3.A:M  0.474 -0.402 -0.882 -0.661  0.454


Any advice on how to account for overdispersion would be much appreciated.

Many thanks in advance
Christine

--
Christine Griffiths
School of Biological Sciences
University of Bristol
Woodland Road
Bristol BS8 1UG
Tel: 0117 9287593
Fax 0117 925 7374
christine.griffi...@bristol.ac.uk
http://www.bio.bris.ac.uk/research/mammal/tortoises.html

__
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.