search for: treatment

Displaying 20 results from an estimated 2516 matches for "treatment".

2008 Apr 04
1
lme4: How to specify nested factors, meaning of : and %in%
...ested random effects works in the lmer function of lme4. To give a concrete example, consider the rat-liver dataset from the R book (rats.txt from: http://www.bio.ic.ac.uk/research/mjcraw/therbook/data/ ). Crawley suggests to analyze this data in the following way: library(lme4) attach(rats) Treatment <- factor(Treatment) Rat <-factor(Rat) Liver<-factor(Liver) m1<-lmer(Glycogen~Treatment+(1|Treatment/Rat/Liver)) The problem that I have with this analysis is that Treatment gets both a fixed and a random effect [1]. So I would like to remove the fixed effect from Treatment, but I&...
2003 Mar 21
2
Trying to make a nested lme analysis
Hi, I''m trying to understand the lme output and procedure. I''m using the Crawley''s book. I''m try to analyse the rats example take from Sokal and Rohlf (1995). I make a nested analysis using aov following the book. > summary(rats) Glycogen Treatment Rat Liver Min. :125.0 Min. :1 Min. :1.0 Min. :1 1st Qu.:135.8 1st Qu.:1 1st Qu.:1.0 1st Qu.:1 Median :141.0 Median :2 Median :1.5 Median :2 Mean :142.2 Mean :2 Mean :1.5 Mean :2 3rd Qu.:150.0 3rd Qu.:3 3rd Qu.:2.0 3rd Qu.:3...
2008 Sep 22
1
lme problems
Hi, I'm analysing a dataset in which the same 5 subjects (male.pair) were subjected to two treatments (treatment) and were measured for 12 successive days within each treatment (layingday). Overall 5*2*12=120 observations. I want to test the effect of treatment, time (layingday) and their interaction. I have done so through the ANOVA below: > bmc3<-aov(Mean1~treatment*layingday+Error(male...
2011 Oct 05
2
gamm: problems with corCAR1()
Dear all, I?m analyzing this dataset containing biodiversity indices, measured over time (Week), and at various contaminant concentrations (Treatment). We have two replicates (Replicate) per treatment. I?m looking for the effects of time (Week) and contaminant concentration (Treatment) on diversity indices (e.g. richness). Initial analysis with GAM models showed temporal autocorrelation of diversity. So now I?m trying to fit this gamm (gamm1):...
2012 Dec 03
0
Nested ANCOVA question
Hello R experts, I have having a difficult time figuring out how to perform and interpret an ANCOVA of my nested experimental data and would love any suggestions that you might have. Here is the deal: 1) I have twelve tanks of fish (1-12), each with a bunch of fish in them 2) I have three treatments (1-3); 4 tanks per treatment. (each tank only has one treatment applied to it) 3) I sampled multiple fish from each tank (1-3) and would like to nest my tanks within each treatment (i.e. four tanks nested in treatment 1, four tanks in treatment 2 and four tanks in treatment 3) in order to account...
2009 Apr 02
1
help with two layers of factors
I have a data frame that looks something like... Column 1 is an experiment_id, Column 2 is the type of treatment ("control", "full treatment", or "partial treatment"), and Column 3 is a value. Experiment_id Treament_type Value 12345 "control" 3 12345 "full treatment" 4 12345 "full treatment" 5 12345 "partial treatment"...
2005 Mar 17
2
Repeated Measures, groupedData and lme
Hello I am trying to fit a REML to some soil mineral data which has been collected over the time period 1999 - 2004. I want to know if the 19 different treatments imposed, differ in terms of their soil mineral content. A tree model of the data has shown differences between the treatments can be attributed to the Magnesium, Potassium and organic matter content of the soil, with Magnesium being the primary separating variable. I am looking at soil mineral da...
2008 Sep 02
5
Appending a record to a table
...an appointment system. I have, through example, just about got the dynamics correct. Even tried to play with some table joins (and excuse me if I''ve used the incorrect terminlogy). But no matter what I try I can''t seem to get the following code to work. I have a cart filled with Treatment id''s. I have a LineItem model set up as follows: class LineItem < ActiveRecord::Base belongs_to :appointment belongs_to :customer belongs_to :therapist belongs_to :treatment end I have worked out enough to be able to create a new LineItem record. I have populated it with appoi...
2013 May 01
1
Multiple Paired T test from large Data Set with multiple pairs
Hi, Assuming that your dataset is similar to the one below: set.seed(25) dat1<- data.frame(Algae.Mass=sample(40:50,10,replace=TRUE),Seagrass.Mass=sample(30:70,10,replace=TRUE),Terrestrial.Mass=sample(80:100,10,replace=TRUE),Other.Mass=sample(40:60,10,replace=TRUE),Site.X.Treatment=rep(c("ALA1A","ALA1U"),each=5),stringsAsFactors=FALSE) library(reshape2) dat2<-melt(dat1,id.var="Site.X.Treatment") sapply(split(dat2,dat2$variable),function(x) t.test(x[x$Site.X.Treatment=="ALA1A",3],x[x$Site.X.Treatment=="ALA1U",3],paired=TRUE...
2008 Feb 03
1
Effect size of comparison of two levels of a factor in multiple linear regression
Dear R users, I have a linear model of the kind outcome ~ treatment + covariate where 'treatment' is a factor with three levels ("0", "1", and "2"), and the covariate is continuous. Treatments "1" and "2" both have regression coefficients significantly different from 0 when using treatment contrasts with tr...
2006 Jun 15
1
Repost: Estimation when interaction is present: How do I get get the parameters from nlme?
...stupidity on my part but it may not be so simple. In brief, my problem is I'm not sure how to extract parameter values/effect sizes from a nonlinear regression model with a significant interaction term. My data sets are dose response curves (force and dose) for muscle that also have two treatments applied Treatment A (A- or A+) and Treatment B (B-/B+). A single muscle was used for each experiment - a full dose response curve and one treatment from the matrix A*B (A-/B-, A+/B-, A-/B+ and A+,B+). There are 8 replicates for each combination of treatments We fit a dose response curve to each...
2011 Jul 14
1
LME and overall treatment effects
Hello fellow R users, I am having a problem finding the estimates for some overall treatment effects for my mixed models using 'lme' (package nlme). I hope someone can help. Firstly then, the model: The data: Plant biomass (log transformed) Fixed Factors: Treatment(x3 Dry, Wet, Control) Year(x8 2002-2009) Random Factors: 5 plots per treatment, 5 quadrats per plot (N=594 (3*5*5...
2012 Jun 26
1
How to estimate variance components with lmer for models with random effects and compare them with lme results
Hi, I performed an experiment where I raised different families coming from two different source populations, where each family was split up into a different treatments. After the experiment I measured several traits on each individual. To test for an effect of either treatment or source as well as their interaction, I used a linear mixed effect model with family as random factor, i.e. lme(fixed=Trait~Treatment*Source,random=~1|Family,method="ML") so...
2004 Aug 19
3
List dimention labels to plots of components
...for plots generated from component objects. If someone could set me straight, I would appreciate it. For your amusement, I have provided an example of the Byzantine code I am currently using to avoid loops: # Simulate ANOVA type test data sex<-c(rep(1,8),rep(0,8)) dose<-c(rep(1,4),rep(0,4)) treatment<-c(rep(1,2),rep(0,2)) fix<-sex+dose+treatment Response<-fix+rnorm(16) Sex<-rep("Male",16) Sex[sex==0]<-"Female" Dose<-rep("High",16) Dose[dose==0]<-"Low" Treatment<-rep("A",16) Treatment[treatment==0]<-"B" dat&lt...
2011 Jun 28
2
gam confidence interval (package mgcv)
Dear R-helpers, I am trying to construct a confidence interval on a prediction of a gam fit. I have the Wood (2006) book, and section 5.2.7 seems relevant but I am not able to apply that to this, different, problem. Any help is appreciated! Basically I have a function Y = f(X) for two different treatments A and B. I am interested in the treatment ratios : Y(treatment = B) / Y(treatment = A) as a function of X, including a confidence interval for this treatment ratio (because we are testing this ratio against some value, across the range of X). The X values that Y is measured at differs between th...
2008 Nov 12
2
creating a file of p.values
Hi all, I am performing hundreds of kruskal wallis tests and trying to figure out how to create a file of the p.values I obtain. This is the code I use for the tests: A2<-kruskal.test(X2~treatment) A3<-kruskal.test(X3~treatment) A4<-kruskal.test(X4~treatment) A5<-kruskal.test(X5~treatment) A6<-kruskal.test(X6~treatment) A7<-kruskal.test(X7~treatment) A8<-kruskal.test(X8~treatment) A9<-kruskal.test(X9~treatment) ect and I can get the p values from each one individ...
2007 Mar 13
1
lme4 and mcmcamp
...values derived from both these methods are totally different. My question is (1) there a bug in my code and > (2) How can I proceed, left with these uncertainties in the estimations of > the p-values? > > Below is the corresponding R code with some output: > ## > fit<-lmer(End~Treatment+offset(log(Area))+(1|Site/Treatment), family=poisson > ## Results > summary(fit) AIC BIC loglik deviance 28.92 35.99 -8.46 16.92 Random effects Groups Name Variance Std dev. Treatment * Site Intercept 5e-10 2.2361e-05 Site Intercept 5e-10...
2007 Mar 12
2
Lmer Mcmc Summary and p values
...values derived from both these methods are totally different. My question is (1) there a bug in my code and > (2) How can I proceed, left with these uncertainties in the estimations of > the p-values? > > Below is the corresponding R code with some output: > ## > fit<-lmer(End~Treatment+offset(log(Area))+(1|Site/Treatment), family=poisson > ## Results > summary(fit) AIC BIC loglik deviance 28.92 35.99 -8.46 16.92 Random effects Groups Name Variance Std dev. Treatment * Site Intercept 5e-10 2.2361e-05 Site Intercept...
2008 Aug 22
1
Help on competing risk package cmprsk with time dependent covariate
Dear R users, I d like to assess the effect of "treatment" covariate on a disease relapse risk with the package cmprsk. However, the effect of this covariate on survival is time-dependent (assessed with cox.zph): no significant effect during the first year of follow-up, then after 1 year a favorable effect is observed on survival (step function migh...
2010 Oct 31
1
Need help with lmer model specification syntax for nested mixed model
...e conflicting online information about whether and how to specify nesting structure for a nested, mixed model. I'll describe my experiment and hopefully somebody who knows lme4 well can help. We're measuring the fluorescence intensity of brain slices from frogs that have undergone various treatments. We want to use multcomp to look for differences between treatments, while accounting for the variance introduced by the random effects of brain and slice. There are a few measurements per slice, several slices per brain, and several brains per treatment. In the data file, the numbering for sli...