search for: trt2

Displaying 20 results from an estimated 23 matches for "trt2".

Did you mean: rt2
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" "sex.tr...
2004 Aug 02
4
Standard errors from glm
...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.contrasts for se...
2005 Nov 03
4
nlme questions
...erning 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 question h...
2007 Jun 01
2
Interaction term in lmer
...ndom effects: Groups Name Variance Std.Dev. center (Intercept) 5e-10 2.2361e-05 number of obs: 14, groups: center, 7 Estimated scale (compare to 1) 0.2672612 Fixed effects: Estimate Std. Error z value Pr(>|z|) (Intercept) -1.060869 0.065372 -16.2282 < 2e-16 *** trt2 1.118029 0.086842 12.8743 < 2e-16 *** center2 -0.325428 0.504256 -0.6454 0.51869 center3 -0.325440 0.504258 -0.6454 0.51868 center4 0.655407 0.413449 1.5852 0.11292 center5 -0.325433 0.504256 -0.6454 0.51869 center6 -0.325421 0.504255 -0...
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
2013 Sep 13
1
Creating dummy vars with contrasts - why does the returned identity matrix contain all levels (and not n-1 levels) ?
...duce the issue: # Create a 4 level example factor trt <- factor( sample( c("PLACEBO", "300 MG", "600 MG", "1200 MG"), 100, replace=TRUE ) ) # Use contrasts to get the identity matrix of dummy variables to be used in glmnet trt2 <- contrasts (trt,contrasts=FALSE) Results (as you can see all levels are represented in the identity matrix): > levels (trt) [1] "1200 MG" "300 MG" "600 MG" "PLACEBO" > print (trt2) 1200 MG 300 MG 600 MG PLACEBO 1200 MG...
2012 Jan 13
1
plotting regression line in with lattice
...ripts){ 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 subsseting the data in it...
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 98 45...
2007 Mar 02
1
Mitools and lmer
...ta > data.dir<-system.file("dta",package="mitools") > files.imp<-imputationList(lapply(list.files(data.dir, > pattern="imp.\\.dta", full=TRUE), read.dta)) > > #estimate model over each imputed dataset > model0<-with(files.imp,lmer( erq2tnc ~1+trt2+nash+wash+male+coh2+coh3+(1 | > sitebeth))) > #extract betas and standard errors > betas<-MIextract(model0,fun=coef) > vars<-MIextract(model0,fun=vcov) > #Combine the results > summary(MIcombine(betas,vars)) > > Error in cbar + results[[i]] : non-numeric argument to bi...
2007 Sep 15
1
Cannot get contrasts to work with aov.
...nal 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 Sum Sq Mean Sq F value Pr(>F) trt 8 1...
2004 Jan 21
0
intervals in lme() and ill-defined models
...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((Intercept)) 3....
2009 May 18
2
Overdispersion using repeated measures lmer
...-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...
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 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 Mar 14
1
How to transform matrices to ANOVA input datasets?
...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 157.9...
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:
2004 Aug 27
3
reorder [stats] and reorder.factor [lattice]
It was recently pointed out on the lists that the S-PLUS Trellis suite has a function called reorder.factor that's useful in getting useful ordering of factors for graphs. I happily went ahead and implemented it, but it turns out that R (not S-PLUS) has a generic called reorder (with a method for "dendrogram"). Naturally, this causes R to think I'm defining a method for
2007 May 31
0
Using MIcombine for coxph fits
...upper) missInfo age 0.035548792 0.0082506946 0.019373545 0.0517240397 4 % sex1 -0.070760613 0.2563372831 -0.580309741 0.4387885156 34 % hepmeg1 0.932378808 0.2026274576 0.532555416 1.3322021993 23 % platelet -0.001757899 0.0009480636 -0.003620446 0.0001046469 14 % trt2 0.137413162 0.1924230007 -0.243815288 0.5186416117 29 % trig 0.003979287 0.0012010053 0.001607266 0.0063513078 25 % --------------- The question I have concerns the meaning of this result. The missInfo column of the summary function suggests that age was missing data, when in f...
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
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,