Displaying 20 results from an estimated 2000 matches similar to: "multiple variance structure in lmer giving zero variances"
2006 Mar 07
1
lme and gls : accessing values from correlation structure and variance functions
Dear R-users
I am relatively new to R, i hope my many novice questions are welcome.
I have problems accessing some objects (specifically the random effects, correlation structure and variance function) from an object of class gls and lme.
I used the following models:
yah <- gls (outcome~ -1 + as.factor(Trial):as.factor(endpoint)+
2010 Sep 17
1
lmer() vs. lme() gave different variance component estimates
Hi, I asked this on mixed model mailing list, but that list is not very active,
so I'd like to try the general R mailing list. Sorry if anyone receives the
double post.
Hi, I have a dataset of animals receiving some eye treatments. There are 8
treatments, each animal's right and left eye was measured with some scores
(ranging from 0 to 7) 4 times after treatment. So there are
2011 Jan 24
2
normality and equal variance testing
I currently have a program that automates 2-way ANOVA on a series of endpoints,
but before the ANOVA is carried out I want the code to test the assumptions of
normality and equal variance and report along with each anova result in the
output file. How can I do this?
I have pasted below the code that I currently use.
library(car)
numFiles = x #
2008 Oct 15
2
Network meta-analysis, varConstPower in nlme
Dear Thomas Lumley, and R-help list members,
I have read your article "Network meta-analysis for indirect treatment
comparisons" (Statist Med, 2002) with great interest. I found it very
helpful that you included the R code to replicate your analysis;
however, I have had a problem replicating your example and wondered if
you are able to give me a hint. When I use the code from the
2006 Aug 24
1
how to constrast with factorial experiment
Hello, R users,
I have two factors (treat, section) anova design experiment where
there are 3 replicates. The objective of the experiment is to test if
there is significant difference of yield between top (section 9 to 11)
and bottom (section 9 to 11) of the fruit tree under treatment. I
found that there are interaction between two factors. I wonder if I
can contrast means from levels of
2006 Aug 29
0
how to contrast with factorial experiment
Hello, R experts,
If I understand Ted's anwser correctly, then I can not contrast the
mean yields between sections 1-8 and 9-11 under "Trt" but I can
contrast mean yields for sections 1-3 and 6-11 because there exists
significant interaction between two factors (Trt:section4,
Trt:section5). Could I use the commands below to test
the difference between sections 1-3 and 6-11 ?
2007 Mar 14
1
How to transform matrices to ANOVA input datasets?
Hello, R experts,
I have a list called dataHP which has 30 elements (m1, m2, ..., m30).
Each element is a 7x6 matrix holding yield data from two factors
experimental design, with treatment in column, position in row. For
instance, the element 20 is:
dataHP[[20]]
col1 col2 col3 trt1 trt2 trt3
[1,] 22.0 20.3 29.7 63.3 78.5 76.4
[2,]
2012 Mar 14
0
statistical contrasts on 3-way interaction
Hi all,
I was trying to use glht() from multcomp package to construct a contrast on interaction term
in a linear model to do some comparisons. I am little uncertain on how to construct contrasts on a 3-way interaction containing a continuous variable, and hope someone can confirm what I did is correct or wrong:
The linear model has a continuous dependent
variable “y”, with treatment factor
2012 Jan 27
1
Confused with Student's sleep data description
I am confused whether Student's sleep data "show the effect of two
soporific drugs" or Control against Treatment (one drug). The reason
is the next:
> require(stats)
> data(sleep)
> attach(sleep)
> extra[group==1]
numeric(0)
> group
[1] Ctl Ctl Ctl Ctl Ctl Ctl Ctl Ctl Ctl Ctl Trt Trt Trt Trt Trt Trt Trt Trt Trt
[20] Trt
Levels: Ctl Trt
> sleep$group
[1] 1 1 1 1 1
2008 Jun 04
1
"& not meaningful for factors"
I am trying to define groupings from levels of factor variables and this the warning message that R give
"& not meaningful for factors".
The nature of my task is this. I have a variable stage which has the levels (1B, 2A, 2B) - these are the AJCC TNM stages of cancer, and another variable diameter with factor levels ("=< 4", "4 - 6.5, > 6.5; limit values are
2011 Apr 20
2
survexp with weights
Hello,
I probably have a syntax error in trying to generate an expected
survival curve from a weighted cox model, but I can't see it. I used
the help sample code to generate a weighted model, with the addition
of a "weights=albumin" argument (I only chose albumin because it had
no missing values, not because of any real relevance). Below are my
code with the resulting error
2005 Nov 02
0
Bugs/issues with model.tables() (PR#8275)
Based on what follows, the most favourable construction is that
the documentation, by failing to say that the function should be
used only for completely balanced designs, is deficient. Even
for such designs, there is a bug that needs correction. The
discussion is lengthy because I think it important to document,
at least wrt effects and means, exactly what model.tables()
does.
My preference is
2005 Aug 18
1
R equivalent to `estimate' in SAS proc mixed
Example: I have the following model
> model <- lmer(response ~ time * trt * bio + (time|id), data = dat)
where time = time of observation
trt = treatment group (0-no treatment / 1-treated)
bio = biological factor (0-absent / 1-present)
and I would like to obtain an estimate (with standard error) of the change
in response over time for individuals in the
2004 Sep 03
0
ML vs. REML with gls()
Hello listmembers,
I've been thinking of using gls in the nlme package to test for serial
correlation in my data set. I've simulated a sample data set and have
found a large discrepancy in the results I get when using the default
method REML vs. ML.
The data set involves a response that is measured twice a day (once for
each level of a treatment factor). In my simulated data set, I
2005 Feb 22
1
Re: R-help Digest, Vol 24, Issue 22
You need to give the model formula that gave your output.
There are two sources of variation (at least), within and
between locations; though it looks as though your analysis
may have tried to account for this (but if so, the terms are
not laid out in a way that makes for ready interpretation.
The design is such (two locations) that you do not have
much of a check that effects are consistent over
2010 Dec 01
2
Lattice dotplots
Dear,
I have a dataset with 4 subjects (see ID in example), and 4 treatment (see
TRT in example) which are tested on 2 locations and in 3 blocs. By using
Lattice dotplot, I made a graph that shows the raw data per location and
per bloc. In that graph, I would like to have a reference line per bloc
that refers to the first treatment (T1). However, I can not find how to do
that.
I can make
2005 Dec 09
1
lmer for 3-way random anova
I have been using lme from nlme to do a 3-way anova with all the effects treated as random. I was wondering if someone could direct me to an example of how to do this using lmer from lme4.
I have 3 main effects, tim, trt, ctr, and all the interaction effects tim*trt*ctr. The response variable is ge.
Here is my lme code:
dat <-
2005 Mar 03
0
Baffled by drop1
I've been experimenting with drop1 for my biostatistics class, to obtain the
so-called Type III sums of squares. I am fully aware of the deficiencies of
this method, however I feel that the students should be familiar with it.
What I find baffling is that when applied to a fully balanced design, you
obtain different sums of squares. I've used this for several years in Splus
and R and never
2005 Mar 03
0
Baffled by drop1: Please ignore previous request!
My apologies to the list for sending this without adequate research. I have
found my answer; please ignore! Thanks.
I've been experimenting with drop1 for my biostatistics class, to obtain the
so-called Type III sums of squares. I am fully aware of the deficiencies of
this method, however I feel that the students should be familiar with it.
What I find baffling is that when applied to a fully
2008 Mar 05
1
Question on "assign(paste.."
Hello,
I'm having trouble in using "assign(paste ..." command . I could create
several dataframes following trinomial distribution using it but it could
not be used to check their row means of the created dataframe.
For example, the following works:
probTrt=matrix(0,4,3);
probTrt;
#malf, death, normal
probTrt[1,]=c(0.064,0.119,0.817);#for Trt 1
probTrt[2,]=c(0.053,0.125,0.823);#for