iv_estimates: linear model fitting to estimate the instrument on dependent...

View source: R/iv_estimates.R

iv_estimatesR Documentation

linear model fitting to estimate the instrument on dependent effect coefficient (beta_ie) and the proportion of variance explained (eta-squared) in dependent by instrument

Description

This function estimates the instrument on dependent effect coefficient (beta) and the proportion of variance explained (eta-squared) in dependent by instrument

Usage

iv_estimates(wdata, dependent, instrument, covariates)

Arguments

wdata

a data frame passed to function containing necessary data for analysis

dependent

a single string character of the column name for the dependent or response (y) variable.

instrument

a single string character of the column name for the instrument, which will be set as the independent or explanatory variable in the model.

covariates

a character vector that are also column names used to define variables that will be set as covariates.

Value

returns a lmfit object that is a list containing (1) 'fit' a lm() object and (2) 'summary' a vector of summary statistics.

Examples

iv_estimates()

hughesevoanth/glsmr documentation built on May 14, 2023, 3:41 p.m.