Description Usage Arguments Value Examples
View source: R/main_functions.R
Partial correlation, p-value and t-statistic associated with the regression between response y and a covariate x after adjustment for a covariate z.
1 2 3 4 5 6 7 8 9 10 11 | parcorr.pvalue(
factor.z,
x,
y,
z,
delta = NULL,
method = "pearson",
alternative = "two.sided",
ttest.pvalue = FALSE,
regression.type
)
|
factor.z |
logical. If TRUE, the fixed variable z is a factor variable. |
x |
(n by 1) matrix corresponding to a covariate vector where n is the sample size. |
y |
(n by 1) a matrix corresponding to the response variable. If |
z |
(n by 1) matrix of additional fixed covariate affecting response variable. Can be NULL. |
delta |
(n by 1) a matrix that denotes censoring when |
method |
character indicating the type of correlation to compute. Default if "pearson" |
alternative |
character indicating whether the p-value is computed using one-sided or two-sided testing. Default is "two-sided". |
ttest.pvalue |
logical indicator. If TRUE, p-value for each covariate is computed from univariate linear/cox regression of the response on each covariate. If FALSE, the p-value is computed from correlation coefficients between the response and each covariate. Default is FALSE. |
regression.type |
a character indicator that is either "linear" for linear regression or "cox" for Cox proportional hazards regression. Default is "linear". |
p.value:p-value of the coefficient of x in the regression of y on x and z.
estimate:Partial correlation between x and y after adjustment for z.
t.stat:t-statistic with testing the significance of x in the regression of y on x and z.
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.