aboutsummaryrefslogblamecommitdiff
path: root/demo/massart97ex8.R
blob: 0a49ec2b0ae4bc7ef78250e172d62976f31aaa09 (plain) (tree)
1
2
3
4
5
6
7
8
9








                                   

                                  
           
data(massart97ex3)
attach(massart97ex3)
xi <- levels(factor(x))
yx <- split(y,factor(x))
ybari <- sapply(yx,mean)
si <- round(sapply(yx,sd),digits=2)
wi <- round(1/(si^2),digits=3)
weights <- wi[factor(x)]
m <- lm(y ~ x,w=weights)
inverse.predict(m, 15, ws = 1.67)
inverse.predict(m, 90, ws = 0.145)
#calplot(m)

Contact - Imprint