Displaying 4 results from an estimated 4 matches for "lmefit".
2006 Apr 06
1
polynomial predict with lme
...ve.
###############
library(nlme)
set.seed(1)
ncows <- 5; nweeks <- 45; week <- 1:nweeks
mcurve <- 25 + 0.819*week - 0.0588*week^2 + 0.000686*week^3
cow.eff <- rnorm(ncows)
week <- rep(week, ncows)
cow <- gl(ncows,nweeks)
yield <- mcurve + cow.eff[cow] + rnorm(ncows*nweeks)
lmefit <- lme(yield ~ poly(week,3), random = ~1|cow)
summary(lmefit) # seems OK
someweeks <- seq(5,45,by=5)
new <- data.frame(week=someweeks)
predicts <- predict(lmefit, new, level=0)
print(predicts) # not even close
#plot(week, yield, las=1)
#lines(someweeks, predicts)
###############
--
*...
2010 Apr 24
1
help please: predict error code
Hello,
I am trying to calculate predicted values derived from one dataset into a hypothetical dataset. I tried this line of code:
graphdata$fmgpredvalues <- predict(Acs250.3.4, graphdata)
and received the following error message:
ERROR: ZXend[1], drop = FALSE] %*%lmeFit$beta
I have made sure all variable names are the same between the two datasets and all factors are appropriately labeled.
I appreciate any insight.
Thanks,
Brittany
[[alternative HTML version deleted]]
2006 Jan 12
2
extract variables from linear model
Hi,
I fitted a linear model:
fit <- lm(y ~ a * b + c - 1 , na.action='na.omit')
Now I want to extract only the a * b effects with confidence intervals.
Of course, I can just add the coefficients by hand, but I think there
should an easier way.
I tried with predict.lm using the 'terms' argument, but I didn't manage
to do it.
Any hints are appreciated,
best,
joerg
2006 Feb 23
2
Strange p-level for the fixed effect with lme function
Hello,
I ran two lme analyses and got expected results. However, I saw
something suspicious regarding p-level for fixed effect. Models are the
same, only experimental designs differ and, of course, subjects. I am
aware that I could done nesting Subjects within Experiments, but it is
expected to have much slower RT (reaction time) in the second
experiment, since the task is more complex, so it