data(coolingFromNuclearWar)
matplot(coolingFromNuclearWar[, 'smoke'],
coolingFromNuclearWar[, 2:5], type='l')
(linFit <- lm(cbind(dC3g, dC10g, dC3n, dC10n)~smoke,
coolingFromNuclearWar))
# total change
dC <- as.matrix(coolingFromNuclearWar[, 2:5] -
rep(unlist(coolingFromNuclearWar[1, -1]), e=4))
(linFit0 <- lm(dC~smoke, coolingFromNuclearWar))
summary(linFit0)
Run the code above in your browser using DataLab