Description Usage Arguments Value Author(s)

View source: R/Generalized_Testing_coefficient_of_mediator.R

Testing coefficient of mediator, namely theta, in the outcome model. The outcome model is the following.

outcome ~ intercept + G*gamma + mediator*theta + error

1 2 3 | ```
Generalized_Testing_coefficient_of_mediator(G,mediator,outcome,
covariates=NULL,outcome_type,
approxi=TRUE,verbose=FALSE)
``` |

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

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

Wujuan Zhong

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.