search for: treat2

Displaying 18 results from an estimated 18 matches for "treat2".

Did you mean: treat
2012 Jan 12
0
multcomp two-way anova with interactions within and between
...ther. I read the pdf 'Additional multcomp Examples' but even though there is an example with an interaction it doesn't work for me when I want to compare within and between groups. Here is an example: #### d.fr<-data.frame(id=rep(1:16,3),treat1=rep(as.factor(LETTERS[1:3]),each= 16),treat2=rep(as.factor(letters[4:7]),each=4),response=rnorm(48)) require(multcomp) require(lme4) fit1<-lmer(response~treat1*treat2+(1|id),data=d.fr) temp<-expand.grid(treat1=unique(d.fr$treat1),treat2=unique(d.fr$treat2)) X<-model.matrix(~treat1*treat2,data=temp) # X gives me a matrix with the...
2011 Mar 02
1
how to delete empty levels from lattice xyplot
...4","6","7","10","11","14","2","3","5","9","12","13") sequence <- c(rep('for/sal', 7), rep('sal/for', 6)) treat1 <- c(rep('for', 7), rep('sal', 6)) treat2 <- c(rep('sal', 7), rep('for', 6)) study <- data.frame(id, sequence, treat1, pef1, treat2, pef2) studyLong <- as.data.frame(rbind(as.matrix(study[,c('id', 'sequence', 'treat1', 'pef1')]), as.matrix(study[,c(&...
2007 Nov 12
0
Resid() and estimable() functions with lmer
...e Variance Std.Dev. initial.size (Intercept) 71.585 8.4608 Residual 49.856 7.0608 number of obs: 323, groups: initial.size, 292 Fixed effects: Estimate Std. Error t value (Intercept) 12.8846 1.3028 9.890 infl.treat1 -0.4738 1.1819 -0.401 def.treat2 -3.5522 1.6022 -2.217 def.treat3 -2.1757 1.6461 -1.322 def.treat4 -2.1613 1.7003 -1.271 Correlation of Fixed Effects: (Intr) infl.1 df.tr2 df.tr3 infl.treat1 -0.413 def.treat2 -0.616 0.013 def.treat3 -0.641 0.002 0.493 def.treat4 -0.638 0.028 0.469 0.524...
2004 Sep 15
0
FW: glmmPQL and random factors
I have just realised that I sent this to Per only. For those interested on the list: -----Original Message----- From: Gygax Lorenz FAT Sent: Tuesday, September 14, 2004 4:35 PM To: 'Per Tor??ng' Subject: RE: [R] glmmPQL and random factors Hi Per, > glmmPQL(Fruit.set~Treat1*Treat2+offset(log10(No.flowers)), > random=~1|Plot, family=poisson, data=...) > > Plot is supposed to be nested in (Treat1*Treat2). > Is this analysis suitable? As far as I understand the methods and with my experience using such analyses, I would say that the model is ok the way you specif...
2003 May 22
1
Experimental Design
...the two experiments are the controls. Is there any ANOVA design that allows me to make this comparison taking into consideration the confounding effect? Any help would be greatly appreciated. Isaac A representation of the experiments follows: Experiment 1 Control1 Treat1 Treat2 Blk1 s1 s2 s3 Blk2 s4 s5 s6 Blk3 s7 s8 s9 Experiment 2 Control2 Treat3 Treat4 Blk1 s1a s2a s3a Blk2 s4a s5a s6a Blk3 s7a s8a...
2004 Jan 27
2
Probability for ANOVA
Hi all! I have 4 treatments on 5 animals Treat1 Treat2 Treat3 Treat4 Animal1 36 37 35 39 Animal2 33 34 36 37 Animal3 37 35 33 38 Animal4 34 36 34 35 Animal5 35 36 33 36 I use an Anova and i try to verify calcul So i retrieve:...
2017 Oct 07
2
Adjusted survival curves
For adjusted survival curves I took the sample code from here: https://rpubs.com/daspringate/survival and adapted for my date, but ... have a QUESTION. library(survival) library(survminer) df<-read.csv("base.csv", header = TRUE, sep = ";") head(df) ID start stop censor sex age stage treatment 1 1 0 66 0 2 1 3 1 2 2 0 18 0 1 2 4 2 3 3 0 43 1 2 3 3 1 4 4 0 47 1 2 3 NA 2 5 5
2011 Aug 09
1
simple plot question
...se excuse the most likely very trivial question, but I'm having no idea where to find related information: I try to recapitulate very simple plotting behavior of Excel within R but have no clue how to get where I want. I have tab delimited data like cell treatment value line a treat1 4 line a treat2 3 line b treat1 8 line b treat2 11 I'd like to have a plot (barplot), that specifies 2 scales on the x-axis (cell and treatment condition). In future this might become more complex, so basically I'd like to have a table/matrix as x-axis! Where do I have to look for working examples, I rea...
2010 Apr 24
0
Assumptions on Non-Standard F ratios
...but searching for this answer was a little difficult as plot() has many uses. Below is an example. I am using R 2.10.1 and Ubuntu 9.04. Thanks in advance! Sam x <- runif(48, 2, 70) data <- data.frame(x) data$treat1 <- factor(c("ONE", "TWO", "THREE")) data$treat2 <- factor(c("PRUNED", "UNPRUNED")) data$row <- factor(1:12) model <- with(data, aov(x ~ treat1 + treat2 + treat1*treat2 + Error(row))) plot(model) Error in plot.window(...) : need finite 'xlim' values In addition: Warning messages: 1: In min(x) : no non-missin...
2009 Apr 01
4
Recode of text variables
Hi all I am trying to do a simple recode which I am stumbling on. I figure there must be any easy way but haven't come across it. Given data of A","B","C","D","E","A" it would be nice to recode this into say three categories ie A and B becomes "Treat1", C becomes "Treat 2" and E becomes "Treat 3". I tried
2008 Feb 03
1
Effect size of comparison of two levels of a factor in multiple linear regression
...3 0.8764573 0.003529013 sims.treat0 <- rnorm(no.of.sims, sims.model[,"(Intercept)"], sqrt(sims.model[,"sigma2"])) sims.treat1 <- rnorm(no.of.sims, sims.model[,"(Intercept)"] + sims.model[,"treatment1"], sqrt(sims.model[,"sigma2"])) sims.treat2 <- rnorm(no.of.sims, sims.model[,"(Intercept)"] + sims.model[,"treatment2"], sqrt(sims.model[,"sigma2"])) # Calculate Cohen's d for simulated values cohens.d(sims.treat1, sims.treat0) [1] 3.683093 cohens.d(sims.treat2, sims.treat0) [1] 5.782622 These values ar...
2011 Feb 17
1
3 questions about the poisson regression of contingency table
...o understand the "independent poisson process"as many books or paper mentioned? For instance: Table1 ------------------------------------------- treat caner non-cancer sum ------------------------------------------- treat1 52(57.18) 19(13.82) 71 treat2 39(33.82) 3 (8.18) 42 ------------------------------------------- sum 91 22 113 ------------------------------------------- The numbers in parentheses are the expected frequency,which are computed by(57.18 for instance): 71*91/113=57.18 But ac...
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,
2006 May 09
2
post hoc comparison in repeated measure
...th repeated measures considering time as the within subject factor: aov(response~treat*time+Error(subject/time),dat) The results told me that the treatment is marginally significant (p=0.04). I would like to know where that significance came from, so I did ALL pairwise t tests (treat1 vs. control, treat2 vs. control, treat1 vs. treat2) at each of the time point. There are 2 ways I can do these t tests, using the MSE from the ANOVA (the MSE used for the treatement effect in the ANOVA, i.e. the treatment by time interaction) as the t test error, or simply ran ordinary t tests using only the data of t...
2012 Nov 19
0
glht function in multcomp gives unexpected p=1 for all comparisons
...ch treatment groups differ.? I tried the glht function in the multcomp package, but I get surprising results, with p=1 for all comparisons.? # My data: surv.data <- data.frame( Site=c(rep("Site1", 9), rep("Site2", 9)), Treatment=rep(c(rep("Treat1", 3), rep("Treat2", 3), rep("Treat3", 3)), 2), survival=c(0.9, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.8, 0.4, 0.6, 0.5, 1.0, 0.7, 0.2, 0.2, 0.4) ) # Binomial GLM: glm.out <- glm(survival~Site*Treatment, data=surv.data, family="binomial", weights=rep(10, nrow(surv.data))) anova(glm.out...
2004 Jun 07
0
dfs in lme
...<- data.frame (gruppe= rep (1:4, rep (20, 4))) # create response variable data.df$zv <- rnorm (80, 2) # create potential explanatory variables data.df$explan <- rnorm (80, 2) data.df$treat <- as.factor (sample (1:3, 80, T)) data.df$treat1 <- as.factor (sample (1:4, 80, T)) data.df$treat2 <- as.factor (sample (1:5, 80, T)) data.df$treat3 <- as.factor (sample (1:6, 80, T)) # with each of the explanatory variables withoutInt <- lme (zv ~ explan, data= data.df, random= ~1 | gruppe) withInt <- lme (zv ~ explan, data= data.df, random= ~ explan | gruppe) anova (withoutInt) an...
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
2007 Oct 29
3
Strange results with anova.glm()
...reat + def.treat + initial.size, family = quasipoisson) Deviance Residuals: Min 1Q Median 3Q Max -6.1541 -2.1872 -0.7045 0.9926 7.5629 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.8788185 0.1093306 17.185 < 2e-16 *** infl.treat1 -0.2456909 0.0924677 -2.657 0.00827 ** def.treat2 -0.1478382 0.1277139 -1.158 0.24788 def.treat3 -0.0780282 0.1207796 -0.646 0.51871 def.treat4 -0.2581576 0.1221538 -2.113 0.03532 * initial.size 0.0013834 0.0000993 13.931 < 2e-16 *** --- Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 (Dispersion parameter for quasipoisson family...