Displaying 1 result from an estimated 1 matches for "d000507_6529035_6683114".
2011 Sep 03
1
Problem with by statement for spaghetti plots
...$id,function(x) fitted.values(lm(tolerance ~
time, data=x)))
fit1 <- unlist(fit)
names(fit1) <- NULL
interaction.plot(tolerance$age, tolerance$id, fit1,xlab="time",
ylab="tolerance", legend=F)/
Here is my code:
/mydata <-
read.table("https://www.sugarsync.com/pf/D000507_6529035_6683114",
header=TRUE)
fit <- by(mydata, mydata$id, function(x) fitted.values(lm(outcome ~ age,
data=x)))
fit1 <- unlist(fit)
names(fit1) <- NULL
interaction.plot(mydata$age, mydata$id, fit1,legend=F)/
I get the following error:
fit <- by(mydata, mydata$id, function(x) fitted.values(lm(ou...