Description Usage Arguments Details Value Author(s)
Generates plots of a linear regression model which includes confounding variables.
1 | plotVisreg(data, y, x, covar, ylabel = x, xlabel = y, ...)
|
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 |
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.
Outputs a plot of the regression model
Luke Johnston
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.