search for: treat

Displaying 20 results from an estimated 10518 matches for "treat".

Did you mean: great
2012 Jun 07
0
how lm behaves
I was wondering if somebody could explain why I get different results here: >treats[,2]<-as.factor(treats[,2]) >treats[,5]<-as.factor(treats[,5]) >treats[,4]<-as.factor(treats[,4]) #there are 'c' on more days than I have 'h2o2', where treats[,4] is the day. I only want 'c' that correspond to the same days that I have a 'h2o2' also....
2011 Nov 08
2
why NA coefficients
Hi, I am trying to run ANOVA with an interaction term on 2 factors (treat has 7 levels, group has 2 levels). I found the coefficient for the last interaction term is always 0, see attached dataset and the code below: > test<-read.table("test.txt",sep='\t',header=T,row.names=NULL) > lm(y~factor(treat)*factor(group),test) Call: lm(formula = y ~...
2011 Aug 26
3
elegant way to check if 2 values are in 3 columns?
Dear all, I'm trying to rerun some data linkage exercises in R (they are designed to be done in SPSS, SAS or STATA) The exercise in question is to relabel the column "treat" to "1", if "yearsep" is smaller than 1988 and columns "proc1"-"proc3" contain the values 56.36 or 59.81. My pathetic solution to do this in R currently looks like this: vaslinks4$treat <- 0 vaslinks4$treat[vaslinks4$yearsep < 1988 &&...
2011 Apr 29
1
Use nparcomp function from nparcomp library to run post hoc
...he nparcomp to run some post hoc non-parametric comparison and got and error. Error in uniroot(pfct, interval = interval) : f() values at end points not of opposite sign Appreciate any comments. the command line: >nparcomp(Ulceration~Group,data=test,type='Dunnett',control='Non-treated') Jun =================================================================== data as follows structure(list(Group = c("Duoderm", "Duoderm", "Duoderm", "Duoderm", "Duoderm", "Duoderm", "Duoderm", "Duoderm", "D...
2003 Sep 30
0
lme vs. aov
...44,-0.1727,-0.1332,0.0986,0.304,-0.4093,0.2054,0.251,-0.1062,0.3833, 0.0649,0.2908,0.1073,0.0919,0.1167,0.2369,0.306,0.1379) y<-c(-0.0649,-0.0923,0.32,0.08,0.0719,0.1017,0.05,-0.1727,-0.1332,0.15,0.304,-0.4093,0.2054,0.251,-0.1062,0.3833,0.0649, 0.2908,0.1073,0.0919,0.1167,0.2369,0.306,0.1379) treat<-as.factor(c(1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2)) time<-as.factor(c(1,1,1,1,2,2,2,2,3,3,3,3,1,1,1,1,2,2,2,2,3,3,3,3)) sex<-as.factor(c('F','F','M','M','F','F','M','M','F','F','M','M'...
2003 Oct 02
0
lme vs. aov with Error term
...0144,-0.1727,-0.1332,0.0986,0.304,-0.4093,0.2054,0.251,-0.1062,0.3833,0.0649,0.2908,0.1073,0.0919,0.1167,0.2369,0.306,0.1379) y<-c(-0.0649,-0.0923,0.32,0.08,0.0719,0.1017,0.05,-0.1727,-0.1332,0.15,0.304,-0.4093,0.2054,0.251,-0.1062,0.3833,0.0649,0.2908,0.1073,0.0919,0.1167,0.2369,0.306,0.1379) treat<-as.factor(c(1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2)) time<-as.factor(c(1,1,1,1,2,2,2,2,3,3,3,3,1,1,1,1,2,2,2,2,3,3,3,3)) sex<-as.factor(c('F','F','M','M','F','F','M','M','F','F','M','M'...
2009 Apr 01
4
Recode of text variables
...m 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 the car library but it didn't seem to like text. Also it seems you can only recode into two categories. library(car) x<-c("A","B","C","D","E","A")...
2003 Oct 01
0
lme vs. aov with Error term again
...0144,-0.1727,-0.1332,0.0986,0.304,-0.4093,0.2054,0.251,-0.1062,0.3833,0.0649,0.2908,0.1073,0.0919,0.1167,0.2369,0.306,0.1379) y<-c(-0.0649,-0.0923,0.32,0.08,0.0719,0.1017,0.05,-0.1727,-0.1332,0.15,0.304,-0.4093,0.2054,0.251,-0.1062,0.3833,0.0649,0.2908,0.1073,0.0919,0.1167,0.2369,0.306,0.1379) treat<-as.factor(c(1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2)) time<-as.factor(c(1,1,1,1,2,2,2,2,3,3,3,3,1,1,1,1,2,2,2,2,3,3,3,3)) sex<-as.factor(c('F','F','M','M','F','F','M','M','F','F','M','M'...
2011 Nov 01
3
factor level issue after subsetting
...n the original data set. A work around is exporting and importing the new subset. Then it's all fine; but I don't like this idea and was wondering what am I missing here? Thanks! Stefan P.S. I am using R 2.13.2 for Mac. > dat<-read.csv("~/MyFiles/data.csv") > class(dat$treat) [1] "factor" > dat treat yield 1 cont 98.7 2 cont 97.2 3 cont 96.1 4 cont 98.1 5 10 103.0 6 10 101.3 7 10 102.1 8 10 101.9 9 30 121.1 10 30 123.1 11 30 119.7 12 30 118.9 13 60 109.9 14 60 110.1 15 60 113.1 16 60 112.3 > plot(d...
2003 Oct 02
0
RE: [S] lme vs. aov with Error term
...093,0.2054,0.251,-0.1062,0.3833,0.0649,0.2908,0.1073,0.0919,0. > 1167,0.2369,0.306,0.1379) > > y<-c(-0.0649,-0.0923,0.32,0.08,0.0719,0.1017,0.05,-0.1727,-0.1332,0.15,0.304 > ,-0.4093,0.2054,0.251,-0.1062,0.3833,0.0649,0.2908,0.1073,0.0919,0.1167,0.23 > 69,0.306,0.1379) > > treat<-as.factor(c(1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2)) > time<-as.factor(c(1,1,1,1,2,2,2,2,3,3,3,3,1,1,1,1,2,2,2,2,3,3,3,3)) > sex<-as.factor(c('F','F','M','M','F','F','M','M','F','F','M',...
2007 Oct 29
3
Strange results with anova.glm()
...i, I have been struggling with this problem for some time now. Internet, books haven't been able to help me. ## I have factorial design with counts (fruits) as response variable. > str(stubb) 'data.frame': 334 obs. of 5 variables: $ id : int 6 23 24 25 26 27 28 29 31 34 ... $ infl.treat : Factor w/ 2 levels "0","1": 2 2 2 2 1 1 1 2 1 1 ... $ def.treat : Factor w/ 4 levels "1","2","3","4": 2 3 1 3 3 3 2 2 3 1 ... $ initial.size : num 854 158 256 332 396 ... $ tot.fruit : int 45 8 19 8 10 7 4 7 2 6 ... ## I fit a glm model...
2010 Aug 11
1
Growth Curves with lmer
...h curve data from an experiment that I try to fit using lm and lmer. The curves describe the growth of classification accuracy with the amount of training data t, so basically y ~ 0 + t (there is no intercept because y=0 at t0) Since the growth is somewhat nonlinear *and* in order to estimate the treatment effect on the growth curve, the final model is y ~ 0 + t + t.squared + t:treat + t,squared:treat this yields: t t.sq t:treat t.sq:treat 1.08 -0.007 0.39 -0.0060 This fits the data fairly well, but I have replicated data for 12 different classifiers. First, I tried 12 s...
2004 Mar 29
0
Error term in aov
Hi, I'm trying to analyse a hierachical design and am running into some trouble. Clearly I don't fully understand "Error" and I was hoping someone could set me straight. We measure percentage algal cover in each of 5 quadrats from each of 16 patches where 4 treatments are randomly allocated to a patch. First suppose patches are coded 1 to 16. then the following gives the results I would expect. > Algae <- c(0, 0, 0, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0, + 0, 0, 13, 0, 23, 17, 0, 56, 46, 0, 79, 32, 51, 22, 5, 0, 0, 0, + 0, 0,...
2008 Jan 30
1
assign column classes when creating a data frame from several vectors
...r your help. I am an R newbie and I am having trouble figuring out the easiest/most efficient way to assign classes to columns in a newly created data frame. R seems to want to convert everything to a factor when I use the cbind function to compile vectors into a data frame. ID<-seq(1,10,1) TREAT<-c(rep("B",5),rep("G",5)) T1<-rnorm(10,50,10) T2<-rnorm(10,15,10) data<-as.data.frame(cbind(ID,TREAT,T1,T2)) data ID TREAT T1 T2 1 1 B 41.506987139726 20.0964019326073 2 2 B 53.7814271299636 4.9049787919397 3 3...
2005 May 26
1
Single factor from interaction.
I have a vague recollection of seeing reference, fairly recently, to a function that forms a single factor which ``codes'' the interaction between two (or more?) factors. Do I recollect correctly? It would be easy enough to roll one's own, but if there is an existing function it probably does a much cleverer job than I would do. cheers, Rolf Turner rolf at math.unb.ca
2009 Nov 27
0
changing titlessymbols in plot.spm
Hi all, I'm trying my best in changing the names of my experiments in the spectral map. My experiments are from six different time points, two as control and two treated experiments. I set have for each time point a different color . Now I want to change the symbols so that I have for the treated experiments one and for the controls a different one. But I want only two different symbols which. The best option will be to have a "C" for the controls and a...
2008 Apr 13
3
Matched pairs with two data frames
Hi, I have a frame "treat" and want to find matched pairs in the data frame "control". In the matched (combined) data frame there should be two variables (0/1),indicating the "source" of the data (treat or control), so that it is possibe to set a "filter" (extraxt/select data). #Here are...
2008 Dec 28
1
Random coefficients model with a covariate: coxme function
Dear R users: I'm new to R and am trying to fit a mixed model Cox regression model with coxme function. I have one two-level factor (treat) and one covariate (covar) and 32 different groups (centers). I'd like to fit a random coefficients model, with treat and covar as fixed factors and a random intercept, random treat effect and random covar slope per center. I haver a couple of doubts on how to use coxme function for this tas...
2003 Nov 16
1
SE of ANOVA (aov) with repeated measures and a bewtween-subject factor
Hallo! I have data of the following design: NSubj were measured at Baseline (visit 1) and at 3 following time points (visit 2, visit 3, visit 4). There is or is not a treatment. Most interesting is the question if there is a difference in treatment between the results of visit 4 and baseline. (The other time points are also of interest.) The level of significance is alpha=0.0179 (because of an interim analysis). My questions: 1) I prefer calculating s model with th...
2005 Oct 05
1
Analyses of covariation with lme() or lm()
Hello all! I have a problem that calls for a better understanding, than mine, of how lme() uses the random part of the call. The dataset consists of eleven field trials (Trial) with three replicates (Block) and four fertiliser treatments (Treat). Analysing for example yield with lme() is easy: m1 <- lme(Yield ~ Treat, data=data, random =~1| Trial/Block) giving estimates of Treat effects with good significances. If I compare m1 with the model without any random structure: m2 <- lm(Yield ~ Treat, data=dat...