Displaying 12 results from an estimated 12 matches for "drug1".
Did you mean:
drug
2007 Jul 05
3
summarizing dataframe at variable/factor levels
...ork but is not very efficient
(could also generalize this to a function). Searched the archives and
docs but didn't see anything close to this question.
Cheers,
dave
dat.ex = data.frame( rep(c(1:6), each=6), c(rnorm(12), rnorm(12, 1),
rnorm(12, 2)), rnorm(36, 5), rep(c(1:6), 6),
rep(c("Drug1", "Drug2", "Placebo"), each=12) )
names(dat.ex) = c("patient.no", "outcome", "x", "time", "drug")
mean of first 2 time pts on Drug1:
mean.time.1.drug.1 = mean( dat.ex[dat.ex$time==1 & dat.ex$drug=="Drug1",
c(2...
2012 Nov 29
2
Analysis of Variance
...ons. Now I try aov and get these results:
res1 <- aov(time~drug,data=example12_7)
summary(res1)
Df Sum Sq Mean Sq F value Pr(>F)
drug 1 7.96 7.964 2.417 0.138
Residuals 17 56.01 3.294
Note these do not agree with above. However, if I enter the data by hand:
Drug1=c(7.3,8.2,10.1,6.0,9.5)
Drug2=c(7.1,10.6,11.2,9.0,8.5,10.9,7.8)
Drug3=c(5.8,6.5,8.8,4.9,7.9,8.5,5.2)
boxplot(Drug1,Drug2,Drug3)
Then create a dataframe:
d=stack(list(Drug1=Drug1,Drug2=Drug2,Drug3=Drug3))
And run aov again:
res=aov(values~ind,data=d)
summary(res)
I get these results:...
2012 May 08
1
coxph data format
Dear List,
Here is an example of survival data in counting process format
(detailed record of each day)
> data[data$Id == 11,]
# extracted one person's record
Id Event Fup Start Stop sex Drug1
601 11 0 6 0 1 0 0
602 11 0 6 1 2 0 0
603 11 0 6 2 3 0 0
604 11 0 6 3 4 0 0
605 11 0 6 4 5 0 1
606 11 1 6 5 6 0 1
which is compressed in the following format (unchanged records of drug...
2008 Jul 04
1
Repeated measures lme or anova
...minimum detectable level.
I'm look for individual and combined effects of Group and Drug.
There are ~400 metabolites which I intend to test independently. (I know that will leave me with a multiple testing issue)
What I've worked out for lme is
> summary(test.lme <- lme(Value ~ Group*Drug1*Drug2*Drug3 - 1, test,random = ~1|Patient))
> anova(test.lme)
and for anova is
> summary(aov(Value~(Group*Drug1*Drug2*Drug3)+Error(Patient/(Drug1*Drug2*Drug3)),test))
The full structure of the 'test' data table for one metabolite is below.
Thanks for your time and any thoughts you...
2011 Feb 08
1
Just another pattern matching / indexing question
Hi all, thank you for your patience.
I am dealing with a large dataset detailing patients and medications
Medications are hard to code, as they are (usually) meaningless unless
matched with doses.
I have a dataframe with vectors (Drug1, Drug2..... Drug 16) and individual
patients are represented by rows.
The vectors are actually factors, with 100s of possible levels (all the
drugs the patient could be on).
All I want to do is produce a vector of logicals (TTTTFFFFTTT......) that I
can cbind into the dataframe, that will tell me...
2011 Sep 28
1
number of items to replace is not a multiple of replacement length
Please help with this error message
drugbook is an 885 x 32 dataframe
>names(drugbook)
[1] "DRUG1" "DRUG2" "DRUG3" "DRUG4" "DRUG5"
[6] "DRUG6" "DRUG7" "DRUG8" "DRUG9" "DRUG10"
[11] "DRUG11" "DRUG12" "DRUG13" &q...
2003 Mar 13
0
Repeated measures 2-way anova -- robustness question
I'm a journalist, wondering what questions to ask about a study that
contrasted the impact on serum cholesterol of two drugs. This was a
40 dog study: 5 treatment blocks of 4 dogs each, randomized to: a
control block, two blocks at different doses of drug1 and two at
corresponding doses of drug2. Analysis was 2-factor repeated measures
ANOVA on treatment group and sampling time. Linear contrast tests
looked at differences between the drugs, and between doses, and found
p<.001 for cholesterol differences between one dosage block of drug1,
the con...
2011 Jun 10
1
ggplot2 avoid automatic color selection
Hey all,
I'm trying to replicate some plots with ggplot2. The problem is that I
need to specify the color for every
attribute (drug). If I use the code below the colors get automatically
assigned but I need to plot drug1 in black drug2 in blue
etc.
How do I do that?
q = qplot(days,vol,data = cellLine7064, color = drug, geom = c("line", "point"))
best regards,
Immanuel
2011 Mar 25
4
two plots in qplot
Hello
I simply want to plot two variables against one 'year' variable in
qplot.
Is any way of doing this without reshaping data in long format and using
facet function afterwards?
Thank you
Denis
2007 Jul 03
1
xyplot and autokey, maintaining colors specified via "col" in key
...that doesn't
seem to do it. I also saw some people using key instead of auto.key, but
that didn't seem consistent. Is there a quick fix to the example code
below?
cheers,
Dave
dat.ex = data.frame( rep(c(1:6), each=6), c(rnorm(12), rnorm(12, 1),
rnorm(12, 2)), rep(c(1:6), 6),
rep(c("Drug1", "Drug2", "Placebo"), each=12) )
names(dat.ex) = c("patient.no", "outcome", "time", "drug")
## colors in xyplot agree w/ colors in key, colors not specified:
xyplot(outcome ~ time, dat.ex, groups=drug, type=c("g", "s...
2007 Sep 12
1
stastistical test on normalized data
Dear R-maillit,
I have to perform a stastistical test to asses if two grug show the same or different effect on my prepartion.
I tested on the same preparation only one drug and I have to use normalized data due to high variability in the control condictions.
What type can I use?
A non paramatric test right?
And how can do it on R software?
Thanks in advance
Simone
[[alternative HTML version
2010 Jul 05
3
adding a row of names to data.frame
Relative noob here, I have a data.frame and simply want to add an explicit column of names in column 1 of the form
"trial_number01" for row 1, "trial_number02" for row 2 .... etc. It is simply for visual purposes and to explain data to others. I've tried
Using row.names and other but still no luck, am sure it has been covered but I can't find it, can you please point