On Oct 16, 2012, at 11:58 AM, Sigrid wrote:
> Okay, I've now tried to the predict function and get the SE, although it seem
> to calculate SE for each observation from the line (I assume), while I want
> the CI-interval and SE for each line fitted line for the treatment. I do not
> really underst
Hi again,
Thank you so much for the script. Unfortunately, I feel like I might not
have explained things clearly enough from the start. What I’m looking for is
the st. errors or CI intervals for the estimate the parameter for slope and
intercept for each level of each factor.
From the summary tab
Hello,
Thinking again, there are better ways of getting all the CI's for the
fitted lines in one go. First, make a list of models, subsetting on each
level of treatment. Then lapply predict.lm to the list of models.
levs <- levels(OrchardSprays$treatment)
model.lst <- lapply(levs, function(.l
Hello,
If you want confidence intervals for the beta coefficients of the model,
try the following.
ci_lm <- function(object, level = 0.95){
sfit <- summary(object)
beta <- sfit$coefficients[, 1]
se <- sfit$coefficients[, 2]
df <- sfit$df[1]
alpha <- 1 - level
lower <- b
Okay, I've now tried to the predict function and get the SE, although it seem
to calculate SE for each observation from the line (I assume), while I want
the CI-interval and SE for each line fitted line for the treatment. I do not
really understand what parameter mean these SEs are calculated from
Hello,
Your model is equivalent to the model below. As for standard errors, try
predict.lm with the appropriate argument.
?predict.lm
model <- lm(decrease ~ rowpos + colpos*treatment, data = OrchardSprays)
predict(model, se.fit = TRUE, interval = "confidence")
Hope this helps,
Rui Barradas
E
Hi Bert,
I just looked at An Introduction to R - and I do apologize if my questions
are trivial. I see that they use predict as a function in lm, but I'm not
sure how to incorporate it into a command.
Thank you,
S
--
View this message in context:
http://r.789695.n4.nabble.com/se-s-and-CI-s-f
?predict
Have you read An Inrtroduction to R?
-- Bert
On Wed, Oct 10, 2012 at 6:49 AM, Sigrid wrote:
> I’m entirely stumped on this particular issue and really hoping someone has
> some advice for me.
>
> I am running a covariant model in lm I would like to give the standard
> errors or the co
I’m entirely stumped on this particular issue and really hoping someone has
some advice for me.
I am running a covariant model in lm I would like to give the standard
errors or the confidence intervals for the fitted lines. I’ve been using the
dataset OrangeSprays where I want lines for each leve
9 matches
Mail list logo