plotVisreg: Visualizing adjusted linear regression models

Description Usage Arguments Details Value Author(s)

Description

Generates plots of a linear regression model which includes confounding variables.

Usage

1
plotVisreg(data, y, x, covar, ylabel = x, xlabel = y, ...)

Arguments

data

Dataset with the variables of interest

y

The dependent or outcome variable in the regression equation

x

The independent or exposure variable in the regression equation

covar

The confounding variables, that is the variables being adjusted for

ylabel

The y-axis label

xlabel

The x-axis label

...

Other options. In development

Details

This function runs a linear regression on the specified variables and plots the partial residuals. This allows for visualizing the relationship between the outcome and the exposure, after adjusting for confounders. A linear slope is plotted through the partial residuals, with a confidence interval band around it. The output is a plot. This function depends on visreg.

Value

Outputs a plot of the regression model

Author(s)

Luke Johnston


lwjohnst86/rstatsToolkit documentation built on May 21, 2019, 9:15 a.m.