ivregfit | R Documentation |
This function fits instrumental variable (MR, ivreg) models
ivregfit(
wdata,
outcome,
exposure,
instrument,
covariates = NA,
weights_variable = NA,
rnt_outcome = FALSE
)
wdata |
a data frame passed to function containing necessary data for analysis |
outcome |
a single string character of the column name for the outcome or dependent or response variable |
exposure |
a single string character of the column name for the exposure or independent or explanatory variable |
instrument |
a data frame passed to function containing necessary data for analysis |
covariates |
a character vector that are also column names used to define variables that will be set as covariates. |
weights_variable |
a single string character of the column name for a weights variable |
rnt_outcome |
binary TRUE or FALSE if the dependent or response variable should be rank normal transformed. |
returns a ivreg object that is a list containing (1) 'fit' a ivreg() object and (2) 'summary' a vector of summary statistics.
ivregfit()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.