Pes dels nadons i paquets de cigarretes fumats per la mare
cor(packs, lbwght) r = -0.1406743 library(foreign) data=read.dta("E:/DATA/WooldridgeBook/bwght.dta") names(data) attach(data) dim(data) 1388 14 plot(packs, lbwght) abline(lm(lbwght~packs)) lm(lbwght~packs) cor(packs, lbwght) r = -0.1406743
plot(lm(lbwght ~packs)) Y = 4.77 - 0.09 X (0.017) -5.29
plot(lm(lbwght ~packs))
lm(lbwght~packs) Coefficients: (Intercept) packs 4.76940 -0.08981 lm(packs~fatheduc) (Intercept) fatheduc 0.31827 -0.01743 lm(packs~motheduc) (Intercept) motheduc 0.45216 -0.02688 lm(lbwght~motheduc) 4.693388 0.005157 lm(lbwght~fatheduc) 4.700098 0.005108