Displaying 20 results from an estimated 3000 matches similar to: "plotting regression line in with lattice"
2010 Aug 31
4
pasting together 2 character arrays
If possible I would like to combine two different character arrays in combinations
Array1 <- c("height","weight","age","sex")
Array2 <- c("trt0","trt1","trt2")
I would like to combine these two character vectors to end up with such ...
Array3
"height.trt0.trt1"
"height.trt0.trt2"
2011 Nov 18
1
[R-sig-ME] account for temporal correlation
[cc'ing back to r-help]
On Fri, Nov 18, 2011 at 4:39 PM, matteo dossena
<matteo.dossena at gmail.com> wrote:
> Thanks a lot,
>
> just to make sure i got it right,
>
> if (using the real dataset) from the LogLikelihood ratio test model1 isn't "better" than model,
> means that temporal auto correlation isn't seriously affecting the model?
yes. (or
2004 Aug 02
4
Standard errors from glm
Kia ora list members:
I'm having a little difficulty getting the correct standard errors from a glm.object (R 1.9.0 under Windows XP 5.1). predict() will gives standard errors of the predicted values, but I am wanting the standard errors of the mean.
To clarify:
Assume I have a 4x3x2 factorial with 2 complete replications (i.e. 48 observations, I've appended a dummy set of data at the
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,]
2007 Sep 15
1
Cannot get contrasts to work with aov.
I have been trying for hours now to perform an orthogonal contrast through an
ANOVA in R.
I have done a two-factor factorial experiment, each factor having three
levels. I converted this dataset to a dataframe with one factor with nine
treatments, as I couldn't work out what else to do.
I have set up a matrix with the eight orthogonal contrasts that I wish to
perform, but despite
2005 Nov 03
4
nlme questions
Dear R users;
Ive got two questions concerning nlme library 3.1-65 (running on R 2.2.0 /
Win XP Pro). The first one is related to augPred function. Ive been working
with a nonlinear mixed model with no problems so far. However, when the
parameters of the model are specified in terms of some other covariates,
say treatment (i.e. phi1~trt1+trt2, etc) the augPred function give me the
following
2007 Jun 01
2
Interaction term in lmer
Dear R users,
I'm pretty new on using lmer package. My response is binary and I have fixed
treatment effect (2 treatments) and random center effect (7 centers). I want
to test the effect of treatment by fitting 2 models:
Model 1: center effect (random) only
Model 2: trt (fixed) + center (random) + trt*center interaction.
Then, I want to compare these 2 models with Likelihood Ratio Test.
2012 Sep 07
2
metafor package: study level variation
Hello. A quick question about incorporating variation due to study in the metafor package. I'm working with a particular data set for meta-analysis where some studies have multiple measurements. Others do not. So, let's say the effect I'm looking at is response to two different kinds of drug treatment - let's call their effect sizes T1 and T2. Some studies have multiple
2002 Dec 15
2
Interpretation of hypothesis tests for mixed models
My question concerns the logic behind hypothesis tests for fixed-effect
terms in models fitted with lme. Suppose the levels of Subj indicate a
grouping structure (k subjects) and Trt is a two-level factor (two
treatments) for which there are several (n) responses y from each
treatment and subject combination. If one suspects a subject by
treatment interaction, either of the following models seem
2013 Sep 13
1
Creating dummy vars with contrasts - why does the returned identity matrix contain all levels (and not n-1 levels) ?
Hello,
I have a problem with creating an identity matrix for glmnet by using the
contrasts function.
I have a factor with 4 levels.
When I create dummy variables I think there should be n-1 variables (in this
case 3) - so that the contrasts would be against the baseline level.
This is also what is written in the help file for 'contrasts'.
The problem is that the function
2009 Jan 12
1
help on nested mixed effects ANOVA
Hello,
I am trying to run a mixed effects nested ANOVA but none of my codes
are giving me any meaningful results and I am not sure what I am doing
wrong. I am a new user on R and would appreciate some help.
The experimental design is that I have some frogs that have been
exposed to three acoustic Treatments and I am measuring neural
activity (egr), in 12 brain regions. Some frogs also called
2006 Oct 08
1
Simulate p-value in lme4
Dear r-helpers,
Spencer Graves and Manual Morales proposed the following methods to
simulate p-values in lme4:
************preliminary************
require(lme4)
require(MASS)
summary(glm(y ~ lbase*trt + lage + V4, family = poisson, data =
epil), cor = FALSE)
epil2 <- epil[epil$period == 1, ]
epil2["period"] <- rep(0, 59); epil2["y"] <- epil2["base"]
2005 Jun 28
1
How to extract the within group correlation structure matrix in "lme"
Dear R users,
I fitted a repeated measure model without random effects by using lme. I will use the estimates from that model as an initial estimates to do multiple imputation for missing values of the response variable in the model. I am trying to extract the within group correlation matrix or covariance matrix.
here is my code:
f = lme(y ~x0+x1+trt+tim+x1:tim +tim:trt,random=~-1|subj,
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
2004 Oct 29
1
fitting linear mixed model for incomplete block design
Dear R developers and users:
I have the following data, x is the response vaiable, nsample(individual) nested within trt, and subsample nested within nsample, I want to fit trt as fixed effect, and block, nsample(trt) as random effects using lme, is the following coding correct?
dat$vgrp <- getGroups(dat, form = ~ 1|trt/nsample, level = 2)
ge.lme1 <- lme(fixed=x~trt, data=dat,
2005 Dec 08
1
Operations on a list
Hello, Everyone,
I am sorry that my message got truncated.
I resend it again as below:
Hello, R Users,
I have a list (say listexp) of 10,000 elements, each of which consists of a
matrix (5X6). It likes:
$"a"
trt1rep1 trt1rep2 trt2rep1 trt2rep2 ctlrep1 ctlrep2
[1,] 50 54 98 89 40 45
[2,] 60 65 76 79
2004 Jan 21
0
intervals in lme() and ill-defined models
There has been some recent discussion on this list about the value of using
intervals with lme() to check for whether a model is ill-defined. My
question is, what else can drive very large confidence intervals for the
variance components (or cause the error message "Error in
intervals.lme(Object) : Cannot get confidence intervals on var-cov
components: Non-positive definite approximate
2009 Apr 29
3
2 way ANOVA with possible pseudoreplication
Hi,
I have an experiment with 2 independant factors which I have been trying to
analyse in R. The problem is that there are several data points recorded on
the same animal. However, no combination of treatments is repeated on the
same animal. All possible combinations of treatments are done in a random
order with as many points as possible being done on 1 animal before moving
onto the next.
The
2004 Dec 01
2
unbalanced design
Hi all,
I'm new to R and have the following problem:
I have a 2 factor design (a has 2 levels, b has 3 levels). I have an
object kidney.aov which is an aov(y ~ a*b), and when I ask for
model.tables(kidney.avo, se=T) I get the following message along with
the table of effects:
Design is unbalanced - use se.contrast() for se's
but the design is NOT unbalanced... each fator level
2009 Jan 28
1
stack data sets
Hi All,
I'm generating 10 different data sets with 1 and 0 in a matrix form and writing the output in separate files. Now I need to stack all these data sets in one vector and I know that stack only operates on list or data frame however I got these data sets by converting list to a matrix so can't go backwards now. Is there a way i can still use Stack?
Please see the program: