Displaying 20 results from an estimated 90 matches similar to: "Overdispersion using repeated measures lmer"
2012 May 19
4
weighted averages for two variables
Hi R users,
I have a dataset with multiple variables and i'm trying to weigh average
depths for fish species per year by their abundance (CPUE. I have tried the
weighted.mean function but as i have two columns for the x value the lenghts
differ with the w (CPUE). How do I solve this problem?
So far I have tried this:
data<-by(allspecies, list(allspecies$Depth, allspecies$Year),
2010 Nov 18
1
lme Random Effects and Covariates
1. I'm attempting to test for Random Effects. I've grouped the data on
subject (grid) but want to use lme to build the model without subject as a
RE then add it and do anova between the 2 models. This is the result I get
and it appears it's adding Random Effects.
tmp.dat4 <- groupedData(Trials ~ 1 | grid, data = tmp.dat4)
mod2a <- lme(Trials ~ factor(group_id) + reversal,
2008 Apr 04
1
lme4: How to specify nested factors, meaning of : and %in%
Hello list,
I'm trying to figure out how exactly the specification of nested random
effects works in the lmer function of lme4. To give a concrete example,
consider the rat-liver dataset from the R book (rats.txt from:
http://www.bio.ic.ac.uk/research/mjcraw/therbook/data/ ).
Crawley suggests to analyze this data in the following way:
library(lme4)
attach(rats)
Treatment <-
2002 Sep 11
0
Contrasts with interactions
Dear All,
I'm not sure of the interpretation of interactions with contrasts. Can anyone help?
I do an ANCOVA, dryweight is covariate, block and treatment are factors, c4 the response variable.
model<-aov(log(c4+1)~dryweight+treatment+block+treatment:block)
summary(model);
Df Sum Sq Mean Sq F value Pr(>F)
dryweight 1 3.947 3.947 6.6268 0.01076 *
2011 Feb 08
1
Error in example Glm rms package
Hi all!
I've got this error while running
example(Glm)
library("rms")
> example(Glm)
Glm> ## Dobson (1990) Page 93: Randomized Controlled Trial :
Glm> counts <- c(18,17,15,20,10,20,25,13,12)
Glm> outcome <- gl(3,1,9)
Glm> treatment <- gl(3,3)
Glm> f <- glm(counts ~ outcome + treatment, family=poisson())
Glm> f
Call: glm(formula = counts ~
2005 Sep 07
1
FW: Re: Doubt about nested aov output
Ronaldo,
Further to my previous posting on your Glycogen nested aov model.
Having read Douglas Bates' response and Reflected on his lmer analysis
output of your aov nested model example as given.The Glycogen treatment has
to be a Fixed Effect.If a 'treatment' isn't a Fixed Effect what is ? If
Douglas Bates' lmer model is modified to treat Glycogen Treatment as a
purely
2006 Jan 29
1
extracting 'Z' value from a glm result
Hello R users
I like to extract z values for x1 and x2. I know how to extract coefficents
using model$coef
but I don't know how to extract z values for each of independent variable. I
looked around
using names(model) but I couldn't find how to extract z values.
Any help would be appreciated.
Thanks
TM
#########################################################
>summary(model)
Call:
2009 Aug 19
3
Sweave output from print.summary.glm is too wide
Hi all
I am preparing a document using Sweave; a really useful tool. But I am having a problem.
Consider this toy example Sweave file:
\documentclass{article}
\begin{document}
<<echo=TRUE,results=verbatim>>=
options(width=40) # Set width to 40 characters
hide <- capture.output(example(glm)) # Create an example of the problem, but hide the output
summary(glm.D93) #
2005 May 23
0
using lme in csimtest
Hi group,
I'm trying to do a Tukey test to compare the means of a factor
("treatment") with three levels in an lme model that also contains the
factors "site" and "time":
model = response ~ treatment * (site + time)
When I enter this model in csimtest, it takes all but the main factor
"treatment" as covariables, not as factors (see below).
Is it
2008 Oct 09
1
Interpretation in cor()
Hello,
I am performing cor() of some of my data. For example, I'll do 3 corr()
(many variables) operations, one for each of the three treatments.
I then do the following:
i <-lower.tri(treatment1.cor)
cor(cbind(one = treatment1.corr[i], two = treatment2.corr[i], three =
treatment3.corr[i]))
Does this operation above tell me how correlated each of the three
treatments is? Because this
2009 Jan 20
1
Poisson GLM
This is a basics beginner question.
I attempted fitting a a Poisson GLM to data that is non-integer ( I believe
Poisson is suitable in this case, because it is modelling counts of
infections, but the data collected are all non-negative numbers with 2
decimal places).
My question is, since R doesn't return an error with this glm fitting, is it
important that the data is non-integer. How does
2009 Nov 22
0
Repeated measures unbalanced in a split-split design
Hi,
I have a experiment with block, plots, sub-plots, and sub-sub-plots
with repeated measures and 3 factors (factorial design) when we have
been observed diameter (mm), high (cm) and leaves number (count).
However, we don't have one treatment in one factor, so, my design is
unbalanced.
On a previous message here, a friend tell me that "It appears to me
that your design is a split-split
2000 May 09
4
Dispersion in summary.glm() with binomial & poisson link
Following p.206 of "Statistical Models in S", I wish to change
the code for summary.glm() so that it estimates the dispersion
for binomial & poisson models when the parameter dispersion is
set to zero. The following changes [insertion of ||dispersion==0
at one point; and !is.null(dispersion) at another] will do the trick:
"summary.glm" <-
function(object, dispersion =
2009 Nov 07
1
lme4 and incomplete block design
Dear list members,
I try to simulate an incomplete block design in which every participants
receives 3 out of 4 possible treatment. The outcome in binary.
Assigning a binary outcome to the BIB or PBIB dataset of the package
SASmixed gives the appropriate output.
With the code below, fixed treatment estimates are not given for each of
the 4 possible treatments, instead a kind of summary
2008 Sep 17
1
ANOVA contrast matrix vs. TukeyHSD?
Dear Help List,
Thanks in advance for reading...I hope my questions are not too ignorant.
I have an experiment looking at evolution of wing size [centroid] in
fruitflies and the effect of 6 different experimental treatments
[treatment]. I have five replicate populations [replic] in each
treatment and have reared the flies in two different temperatures [cond]
to assay the wing size, making
2008 Sep 10
1
Mixed effects model with binomial errors - problem
Hi,
We released individual birds into a room with 2 trees. We counted the number
of visits to each of the 2 tree. One of the trees is always a control tree
and the other tree is either treatment 1, treatment 2 or treatment3 or
treatment 4.
Ind Treat ContrTree ExpTree Total visits
1 1 11 16 27
1 2 6 9 15
1 3 5 13 18
1 4 11 25 36
2 1 2 3 5
4 1 6 7 13
4 3 4 4 8
4 4 2 5 7
6 1 1 1 2
6 4 5 16 21
2006 May 09
2
post hoc comparison in repeated measure
Hi, I have a simple dataset with repeated measures.
one factor is treatment with 3 levels (treatment1,
treatment2 and control), the other factor is time (15
time points). Each treatment group has 10 subjects
with each followed up at each time points, the
response variable is numeric, serum protein amount. So
the between subject factor is treatment, and the
within subject factor is time. I ran a
2009 Feb 16
1
Overdispersion with binomial distribution
I am attempting to run a glm with a binomial model to analyze proportion
data.
I have been following Crawley's book closely and am wondering if there is
an accepted standard for how much is too much overdispersion? (e.g. change
in AIC has an accepted standard of 2).
In the example, he fits several models, binomial and quasibinomial and then
accepts the quasibinomial.
The output for residual
2009 Dec 18
2
NLS-Weibull-ERROR
Hello
I was trying to estimate the weibull model using nls after putting OLS
values as the initial inputs to NLS.
I tried multiple times but still i m getting the same error of Error in
nlsModel(formula, mf, start, wts) :
singular gradient matrix at initial parameter estimates.
The Program is as below
> vel <- c(1,2,3,4,5,6,7,8,9,10,11,12,13,14)
> df <- data.frame(conc, vel)
>
2005 Jun 14
2
ordinary polynomial coefficients from orthogonal polynomials?
How can ordinary polynomial coefficients be calculated
from an orthogonal polynomial fit?
I'm trying to do something like find a,b,c,d from
lm(billions ~ a+b*decade+c*decade^2+d*decade^3)
but that gives: "Error in eval(expr, envir, enclos) :
Object "a" not found"
> decade <- c(1950, 1960, 1970, 1980, 1990)
> billions <- c(3.5, 5, 7.5, 13, 40)
> #