Description Usage Arguments Details Value Author(s) References See Also Examples
multreg.second
conducts a multiple regression analysis using published work.
1 2 | multreg.second(formula, corr, n,
m = NULL, sd = NULL, sig.level = 0.05, digits = 3)
|
formula |
two-sided formula; the left-hand-side of which gives one dependent variable containing a numeric variable, and the right-hand-side of several independent variables containing a numeric variable |
corr |
a matrix or data frame contains the correlation matrix |
n |
a numeric contains the sample size |
m |
a numeric vector contains the means (default NULL) |
sd |
a numeric vector contains the sample/unbiased standard deviations (default NULL) |
sig.level |
a numeric contains the significance level (default 0.05) |
digits |
the specified number of decimal places (default 3) |
This function conducts a multiple regression analysis using published work.
The dependent variable and independent variables should be a numeric vector.
In this function, you cannot specify any interaction nor any curvilinear effect.
If you do not specify m
and sd
, raw.estimates
will not be obtained.
Statistical power is calculated using the following specifications:
(a) small (R^{2} = 0.02), medium (R^{2} = 0.13), and large (R^{2} = 0.26) population effect sizes, according to the interpretive guideline for effect sizes by Cohen (1992)
(b) sample size specified by data
(c) significance level specified by sig.level
(d) numbers of independent variable specified by formula
corr.partial.corr |
returns a product-moment correlation matrix (lower triangle) and a partial correlation matrix given all remaining variables (upper triangle) |
corr.confidence |
returns lower and upper confidence limits (lower and upper triangles, respectively) |
omnibus.es |
returns a coefficient of determination and its' confidence interval |
raw.estimates |
returns partial regression coefficients, their confidence intervals, and standard errors |
standardized.estimates |
returns standardized partial regression coefficients, their confidence intervals, and standard errors |
power |
returns statistical power for detecting small (R^{2} = 0.02), medium (R^{2} = 0.13), and large (R^{2} = 0.26) population effect sizes |
Yasuyuki Okumura
Department of Social Psychiatry,
National Institute of Mental Health,
National Center of Neurology and Psychiatry
yokumura@blue.zero.jp
Cohen J (1992) A power primer. Psychological Bulletin, 112, 155-159.
Cohen J, Cohen P, Aiken LS (2003) Applied multiple regression/correlation analysis for the behavioral sciences (3rd ed). Mahwah, NJ: Erlbaum.
Smithson M (2001) Correct confidence intervals for various regression effect sizes and parameters: The importance of noncentral distributions in computing intervals, 61, 605-632.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ##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 = apply(dat, 2, mean), sd=apply(dat, 2, sd))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.