simulateResiduals: Generate simulated residuals for a latent variable

View source: R/decomposition.R

simulateResidualsR Documentation

Generate simulated residuals for a latent variable

Description

Based on Wolff (2012), this will generate simulated residuals from a probit model such that the generated residual plus the linear prediction corresponds to the observed outcome (i.e. Y==1:Y*>0; Y==0:Y*<=0)

Usage

simulateResiduals(m, df, outcome = "y")

Arguments

m

a probit regression model

df

the data used to run the probit regression

outcome

the name of the outcome variable

Value

A vector of simulated residuals


telliott27-research/KOBdecomp documentation built on March 19, 2022, 7:27 a.m.