0
library(polynom)
set.seed(12345)
x<-seq(1,5,0.01)
lp<-rnorm(401,-0.7,1)-20*x+7*x^2
link_lp <- exp(lp)/(1 + exp(lp))
y<-(runif(401) < link_lp)
f<-glm(y~poly(x,degree=2),family="binomial")
par(mfrow=c(1,3))
plot(x,f$linear.predictors)
plot(polynomial(coef(f)),xlim=c(1,5))
plot(x,f$fitted)
Zahlen mit über Codes erzeugt, warum der Unterschied zwischen Handlung von GLM erzeugt() und Polynom()
die durch lineare Prädiktor und Polynom vorgelegten Zahlen() soll gleich sein , aber eigentlich sind sie anders. Was ist falsch an meinem Code?
Das ist großartig! Vielen Dank für Ihre Hilfe @ Roland –