Description Usage Arguments Value Author(s) Examples
View source: R/print.simpleRslopes.R View source: R/methods.R
Print method for simple_slopes
1 2 |
x |
|
... |
Additional arguments. No additional arguments available at this time |
Returns a results for the simple slopes
Alexander Christensen <alexpaulchristensen@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # Generate data
df <- data.frame(
y = rnorm(100),
x1 = rnorm(100),
x2 = rnorm(100)
)
# Estimate linear model
fit <- lm(y ~ x1 * x2, data = df)
# Estimate simple slopes
simple_slopes(
fit = fit,
variable1name = "x1", # must be name as it appears in 'fit' object
variable2name = "x2", # must be name as it appears in 'fit' object
plot = FALSE # only FALSE for CRAN checks
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.