##Cohen (2003) Table 3.5.1
dat <- data.frame(
salary = c(51876, 54511, 53425, 61863, 52926, 47034, 66432, 61100, 41934,
47454, 49832, 47047, 39115, 59677, 61458, 54528, 60327, 56600,
52542, 50455, 51647, 62895, 53740, 75822, 56596, 55682, 62091,
42162, 52646, 74199, 50729, 70011, 37939, 39652, 68987, 55579,
54671, 57704, 44045, 51122, 47082, 60009, 58632, 38340, 71219,
53712, 54782, 83503, 47212, 52840, 53650, 50931, 66784, 49751,
74343, 57710, 52676, 41195, 45662, 47606, 44301, 58582),
pubs = c(18, 3, 2, 17, 11, 6, 38, 48, 9, 22, 30, 21,
10, 27, 37, 8, 13, 6, 12, 29, 29, 7, 6, 69, 11, 9,
20, 41, 3, 27, 14, 23, 1, 7, 19, 11, 31, 9, 12, 32,
26, 12, 9, 6, 39, 16, 12, 50, 18, 16, 5, 20, 50,
6, 19, 11, 13, 3, 8, 11, 25, 4),
cits = c(50, 26, 50, 34, 41, 37, 48, 56, 19, 29,
28, 31, 25, 40, 61, 32, 36, 69, 47, 29, 35,
35, 18, 90, 60, 30, 27, 35, 14, 56, 50, 25,
35, 1, 69, 69, 27, 50, 32, 33, 45, 54, 47, 29,
69, 47, 43, 55, 33, 28, 42, 24, 31, 27,
83, 49, 14, 36, 34, 70, 27, 28) )
multreg.second(salary~ pubs + cits, corr=cor(dat), n= nrow(dat))
multreg.second(salary~ pubs + cits, corr=cor(dat), n= nrow(dat),
m = mean(dat), sd=sd(dat))
Run the code above in your browser using DataLab