Kapitel 8-9

Axel Duvebäck & David Sivén

require(mosaic)

8.05

a) 67.9

g = fetchData("Galton")
Data Galton found in package.
lm(height ~ father, data = g)

Call:
lm(formula = height ~ father, data = g)

Coefficients:
(Intercept)       father  
     39.110        0.399  
39.1104 + 0.3994 * 72
[1] 67.87

b) 68.1

lm(height ~ father + mother, data = g)

Call:
lm(formula = height ~ father + mother, data = g)

Coefficients:
(Intercept)       father       mother  
     22.310        0.380        0.283  
22.3097 + 0.3799 * 72 + 0.2832 * 65
[1] 68.07

c) 68.1

lm(height ~ father * mother, data = g)

Call:
lm(formula = height ~ father * mother, data = g)

Coefficients:
  (Intercept)         father         mother  father:mother  
     132.3478        -1.2060        -1.4294         0.0247  
132.34782 - 1.20605 * 72 - 1.42937 * 65 + 0.02468 * 72 * 65
[1] 68.11

8.10

Part1

F

9.02

a) 100

b) 100/145

9.04

Part 1 A

Part 2 D

Part 3 D

Part 4 C

9.11

Modellen är alltid identisk med medelvärdet. 1- x/x=0.