Generalized_Testing_coefficient_of_mediator {SMUT} | R Documentation |
Testing coefficient of mediator in the outcome model for an outcome following an exponential family distribution or a survival outcome
Description
Testing coefficient of mediator, namely theta, in the outcome model. The outcome model is the following.
outcome ~ intercept + G*gamma + mediator*theta + error
Usage
Generalized_Testing_coefficient_of_mediator(G,mediator,outcome,
covariates=NULL,outcome_type,
approxi=TRUE,verbose=FALSE)
Arguments
G |
n by p matrix (n rows and p columns). Each row is one individual; each column is one SNP. |
mediator |
a vector length of n. It is the mediator variable. |
outcome |
a vector length of n. It is the outcome variable. |
covariates |
n by r matrix (n rows and r columns). Each row is one individual; each column is one covariate. |
outcome_type |
Type of the outcome variable. "continuous" for a continuous outcome; "binary" for a binary outcome; "count" for a count outcome; "survival" for a survival outcome. |
approxi |
a boolean value. This is an indicator whether the approximation of computing derivatives is applied to save computing time. Default is TRUE. |
verbose |
a boolean value. If TRUE a lot of computing details is printed. Default is FALSE. |
Value
p_value |
P value for testing the coefficient of mediator in the outcome model. |
theta_hat |
The point estimate of theta (coefficient of mediator) in the outcome model. |
Author(s)
Wujuan Zhong