correlations: Correlation, p-value and t-statistic associated with the...

Description Usage Arguments Value

View source: R/main_functions.R

Description

Correlation, p-value and t-statistic associated with the regression between response y and a covariate x after potential adjustment for a covariate z.

Usage

1
2
3
4
5
6
7
8
9
correlations(
  factor.z,
  x,
  z,
  response,
  partial = FALSE,
  ttest.pvalue = FALSE,
  regression.type
)

Arguments

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 regression.type is "cox", y contains the observed event times. delta is an (n by 1) matrix that denotes censoring when regression.type is "cox" (1 denotes survival event is observed, 0 denotes the survival event is censored). Can be NULL.

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".

Value


rakheon/d2wlasso documentation built on Feb. 26, 2020, 10:39 p.m.