Description Usage Arguments Value Examples
View source: R/main_functions.R
Pearson correlation, p-value and t-statistic associated with the regression between response y and a covariate x
1 2 3 4 5 6 7 8 9  | corr.pvalue(
  x,
  y,
  delta,
  method = "pearson",
  alternative = "two.sided",
  ttest.pvalue = FALSE,
  regression.type
)
 | 
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   | 
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.
estimate:Pearson correlation between x and y.
t.stat:t-statistic with testing the significance of x in the regression of y on x.
1 2 3 4 5 6 7  | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.