hi this is a regression analysis. Below is a example about model selection In he
ID: 2925654 • Letter: H
Question
hi
this is a regression analysis.
Below is a example about model selection
In here, i don't know how to make this as a R-code.
And also i don't understand this problem. ( In this book, this is said to be relate with (Linhart&Zuccihinni)'s chapter6-3 )
(I think "x <- seq(1,10,by=0.09)" but it has 101 variables...)
And from here. i wanna this graph
in here "dotted line is true model", and "solid line is fitted model"
Can you help me?
=exp (0.1 +0.020 ?), n= 100, (zi,Vi ),i-1, , 100, x-1 (0.09) 10g ~ M(0.1.52) set the model : f6(x)- 3 1-0Explanation / Answer
Just run the code in R/RStudio
#############################################################
rm(list = ls())
set.seed(61)
x <- seq(1,10,by=0.09)
true <- exp(0.1+0.02*x^2)
y <- true+rnorm(length(x),0,1.5)
fit <- lm(y~poly(x,6))
plot(fitted(fit),x,type="l",xlim = c(0,10),ylim = c(-2,10))
par(new=TRUE)
plot(y,x,xlim = c(0,10),ylim = c(-2,10))
par(new=TRUE)
plot(true,x,xlim = c(0,10),ylim = c(-2,10),type = "l",lty=2)
##############################################################
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.