Displaying 18 results from an estimated 18 matches for "trt1".
Did you mean:
trt
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"
"weight.trt0.trt1"
"weight.trt0.trt2"
"age.trt0.trt1"
"age.trt0.trt2"
"sex.trt0.trt1&q...
2004 Aug 02
4
Standard errors from glm
...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 end of this message). Call the treatments trt1 (4 levels), trt2 (3 levels) and trt3 (2 levels) and the replications rep - all are factors. The observed data is S. Then:
temp.aov <- aov(S~rep+trt1*trt2*trt3, data=dummy.data)
model.tables(temp.aov, type='mean', se=T)
Returns the means, but states "Design is unbalanced - use se...
2005 Nov 03
4
nlme 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 error: "Error in predict.nlme(object,
value[1:(nrow(value)/nL),,drop=FALSE], : Levels 0,1 not allowed for trt1,
trt2". The same model specification as well as the augPred function under
SPlus 2000 run without problems. The second quest...
2012 Mar 14
0
statistical contrasts on 3-way interaction
...rpose is to test whether treatment effect is significant given
each level of factor A, so I used contrasts:
library(multcomp)
K <- rbind(c(0,0,1,0,0), c(0,0,1,0,1))
rownames(K) <- c('Trt 1-0|A=0','Trt 1-0|A=1')
colnames(K) <- names(coef(fit))
K
(Intercept) x Trt1 A1 Trt1:A1
Trt 1-0|A=0 0 0 1 0 0
Trt 1-0|A=1 0 0 1 0 1
(glht.fit <- summary(glht(fit, linfct =
K), test=adjusted(type='none')))
Linear
Hypotheses:
Estimate Std. Error t value
Pr(>|t|)
Trt 1-0|A=0 ==
0 -0.2720 0.3616 -...
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
2012 Jan 13
1
plotting regression line in with lattice
...n(x, y, ..., subscripts){
fill <- my.fill[combined$trt[subscripts]]
panel.xyplot(x, y, pch = 21, fill = my.fill, col = "black")
},
key = list(space = "right",
text = list(c("trt1", "trt2"), cex = 0.8),
points = list(pch = c(21), fill = c("black", "grey")),
rep = FALSE)
)
)
plot
#I've also tried to move type and distribute type within panel.xyplot, as well as subsseti...
2010 Oct 20
2
create a list fails
...)
Error: object 'stuff21' not found
>
Why does it have to be found, exist previously ... it is being created?
But this works fine ....
data <- list(Ntrials =numtritot, Ncomparisons=2,
treat=c(rep(1 ,N.trials[1,2]), rep(2,N.trials[1,3])),
total.patientnums.trt1=dat2[ ,2],
total.patientnums.trt23=dat2[ ,2],
num.countstrt1=dat2[ ,5],
num.countstrt23=dat2[ ,6] )
.... ????
===============================
Dr. Jim Maas
University of East Anglia
[[alternative HTML version deleted]]
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 34 43
[3,] 86 83 34 45 38 34
[4,] 67 78 88...
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
2007 Sep 15
1
Cannot get contrasts to work with aov.
...se to do.
I have set up a matrix with the eight orthogonal contrasts that I wish to
perform, but despite having searched this mailing list's archives
thoroughly, I cannot get it to work.
I am looking to get output along the lines of
Df Sum Sq Mean Sq F value Pr(>F)
trt1 1 X X X X
trt2 1 X X X X
...............
trt9 1 X X X X
Residuals 27 495.1 18.3
However, for everything I've tried, I've simply gotten
Df...
2004 Jan 21
0
intervals in lme() and ill-defined models
...DOES appear to work, but the authors are using
S-PLUS. My concern is that when I try to fit the following two models to my
own data, I get very large confidence intervals for the within-subject error
even thought AIC selects the autoregressive model as best:
> result <-
lme(log(T1+1)~factor(trt1)*factor(trt2)*factor(Census),data=data,random=~1|B
lock/Subject)
> result.ar1 <-
lme(log(T1+1)~factor(trt1)*factor(trt2)*factor(Census),data=data,random=~1|B
lock/Subject,correlation=corAR1())
> intervals(result.ar1)
Random Effects:
lower est. upper
sd((I...
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
2007 Mar 14
1
How to transform matrices to ANOVA input datasets?
...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,] 102.4 92.3 72.2 199.2 201.1 218.9
[3,] 18.8 20.8 22.9 106.2 148.4 147.6
[4,] 14.5 17.2 15.6 120.1 115.8 124.6
[5,] 31.9 28.3 22.8...
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:
2001 Dec 03
3
beginner's questions about lme, fixed and random effects
I'm trying to understand better the differences between fixed and
random effects by running very simple examples in the nlme
package. My first attempt was to try doing a t-test in lme.
This is very similar to the Rail example that comes with nlme,
but it has two groups instead of five.
So I try
a1 <- 1:10
a2 <- 7:16
t.test(a2,a1)
getting t(18)=4.43, p=.0003224. Then I try to do it
2010 Feb 09
1
Missing interaction effect in binomial GLMM with lmer
Dear all,
I was wondering if anyone could help solve a problem of a missing interaction effect!!
I carried out a 2 x 2 factorial experiment to see if eggs from 2 different locations (Origin = 1 or 2) had different hatching success under 2 different incubation schedules (Treat = 1 or 2). Six eggs were taken from 10 females (random = Female) at each location and split between the treatments,
2017 Jun 29
1
Changing ggplot2 legend key/title to custom text
Hi Petr and thanks for your reply,
That's the problem I don't want to modify the labels of my legends but the title of the legend in itself inserting my custom text :)
Take for example the 1st graph in this tutorial
http://www.sthda.com/english/wiki/ggpubr-r-package-ggplot2-based-publication-ready-plots
I want to change the "sex" in "sex subscript 2" or "
2009 Jan 28
2
t.test in a loop
Hi All,
I've been having a little trouble with creating a loop that will run a a
series of t.tests for inspection,
Below is the code i've tried, and some checks i've looked at.
I've used the get(paste()) idea as i was told previously that the use of the
eval should try and be avoided.
I've run a single syntax to check that my systax is correct and works
without any problems