Hello,
You should follow the posting guide and provide us with a data and code
example.
# Make up some data
x <- seq(0, 1, length.out = 20)
y <- x^2 + rnorm(20)
# fit a quadratic
model <- lm(y ~ I(x^2))
fitted <- predict(model, interval = "confidence")
# plot the data and the fitted line
plo
Hi Elaine
you can do all at one go using the ggplot2-package
library(ggplot2)
qplot(age,weight)+ geom_smooth(method="lm",formula=y~poly(x,2))
Have a look at ?geom_smooth when you want to incooperate customized
model predictions
cheers.
Am 07.02.2013 02:31, schrieb Elaine Kuo:
> Hello,
>
> I dr
Hello,
I drew a plot of weight and height of people and fitted it with a
polynominal regression x^2.
(using curve())
Now I would like to draw the confidence interval line for the fitted curve.
Please kindly advise the code for the purpose.
Thank you.
Elaine
[[alternative HTML version de
3 matches
Mail list logo