Regression weights, residuals and residual plots for expanded datasets.
## S3 method for class 'expData'residuals(object,...)## S3 method for class 'expData'residualPlot(model,...)## S3 method for class 'expData'residualPlots(model,...)## S3 method for class 'expData'weights(object,...)
Arguments
object: an expanded dataset (of class "expData").
...: additional arguments.
model: an expanded dataset (of class "expData") (for use with residualPlot and residualPlots).
Details
weights extracts regression weights (to be used in the natural effect model) for each observation of an expanded dataset.
residuals extracts residuals from the working model which is stored as an attribute of the expanded dataset. These can be used to assess normality of the residuals of the mediator working model when using the weighting-based approach (see example).
residualPlot and residualPlots are convenience functions from the car package. These can be used to assess the adequacy of the working model.
Examples
data(UPBdata)weightData <- neWeight(negaff ~ att + gender + educ + age, data = UPBdata, nRep =2)## extract regression weights for natural effect modelhead(weights(weightData))## assess normalityqqnorm(residuals(weightData))## assess model adequacylibrary(car)residualPlots(weightData)