Description Usage Arguments Value
View source: R/main_functions.R
Correlation, p-value and t-statistic associated with the regression between response y and a covariate x after potential adjustment for a covariate z.
1 2 3 4 5 6 7 8 9 | correlations(
factor.z,
x,
z,
response,
partial = FALSE,
ttest.pvalue = FALSE,
regression.type
)
|
factor.z |
logical. If TRUE, the fixed variable z is a factor variable. |
x |
(n by m) matrix of main covariates where m is the number of covariates and n is the sample size. |
z |
(n by 1) matrix of additional fixed covariate affecting response variable. Can be NULL. |
response |
a list containing: yy and delta. yy is an (n by 1) matrix corresponding to the response variable. If |
partial |
logical indicator. If TRUE, the partial correlation is computed between the response and each covariate in x after adjustment for z. If FALSE, the correlation is computed between the response and each covariate in x. |
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". |
pvalues:p-values for each x_k in the regression of y on x_k when partial
=FALSE. Otherwise,
p-values for each x_k in the regression of y on x_k and z when partial
=TRUE.
estimate:Correlation between x_k and y when partial
=FALSE.
Otherwise, estimate
is the partial correlation between x_k and y after adjustment for z
when partial
is TRUE.
tvalues:t-statistic with testing the significance of x_k in the regression
of y on x_k and z when partial
is TRUE. Otherwise it is the t-statistic when testing the
significance of x_k in the regression of y on x_k when partial
is FALSE.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.