Skip to contents

Template file to add report support for new objects. Check-out the vignette on Supporting New Models.

Usage

# S3 method for default
report(x, ...)

# S3 method for default
report_effectsize(x, ...)

# S3 method for default
report_table(x, ...)

# S3 method for default
report_statistics(x, ...)

# S3 method for default
report_parameters(x, ...)

# S3 method for default
report_intercept(x, ...)

# S3 method for default
report_model(x, ...)

# S3 method for default
report_random(x, ...)

# S3 method for default
report_priors(x, ...)

# S3 method for default
report_performance(x, ...)

# S3 method for default
report_info(x, ...)

# S3 method for default
report_text(x, ...)

Arguments

x

Object of class NEW OBJECT.

...

Arguments passed to or from other methods.

Value

An object of class report().

See also

Examples

library(report)

# Add a reproducible example instead of the following
model <- lm(Sepal.Length ~ Petal.Length * Species, data = iris)
r <- report(model)
r
#> We fitted a linear model (estimated using OLS) to predict Sepal.Length with Petal.Length and Species (formula: Sepal.Length ~ Petal.Length * Species). The model explains a statistically significant and substantial proportion of variance (R2 = 0.84, F(5, 144) = 151.71, p < .001, adj. R2 = 0.83). The model's intercept, corresponding to Petal.Length = 0 and Species = setosa, is at 4.21 (95% CI [3.41, 5.02], t(144) = 10.34, p < .001). Within this model:
#> 
#>   - The effect of Petal Length is statistically non-significant and positive (beta = 0.54, 95% CI [-4.76e-03, 1.09], t(144) = 1.96, p = 0.052; Std. beta = 1.16, 95% CI [-0.01, 2.32])
#>   - The effect of Species [versicolor] is statistically significant and negative (beta = -1.81, 95% CI [-2.99, -0.62], t(144) = -3.02, p = 0.003; Std. beta = -0.88, 95% CI [-2.41, 0.65])
#>   - The effect of Species [virginica] is statistically significant and negative (beta = -3.15, 95% CI [-4.41, -1.90], t(144) = -4.97, p < .001; Std. beta = -1.75, 95% CI [-3.32, -0.18])
#>   - The interaction effect of Species [versicolor] on Petal Length is statistically non-significant and positive (beta = 0.29, 95% CI [-0.30, 0.87], t(144) = 0.97, p = 0.334; Std. beta = 0.61, 95% CI [-0.63, 1.85])
#>   - The interaction effect of Species [virginica] on Petal Length is statistically non-significant and positive (beta = 0.45, 95% CI [-0.12, 1.03], t(144) = 1.56, p = 0.120; Std. beta = 0.97, 95% CI [-0.26, 2.19])
#> 
#> Standardized parameters were obtained by fitting the model on a standardized version of the dataset. 95% Confidence Intervals (CIs) and p-values were computed using a Wald t-distribution approximation.
summary(r)
#> We fitted a linear model to predict Sepal.Length with Petal.Length and Species. The model's explanatory power is substantial (R2 = 0.84, adj. R2 = 0.83). The model's intercept is at 4.21 (95% CI [3.41, 5.02]). Within this model:
#> 
#>   - The effect of Petal Length is statistically non-significant and positive (beta = 0.54, 95% CI [-4.76e-03, 1.09], t(144) = 1.96, p = 0.052, Std. beta = 1.16)
#>   - The effect of Species [versicolor] is statistically significant and negative (beta = -1.81, 95% CI [-2.99, -0.62], t(144) = -3.02, p = 0.003, Std. beta = -0.88)
#>   - The effect of Species [virginica] is statistically significant and negative (beta = -3.15, 95% CI [-4.41, -1.90], t(144) = -4.97, p < .001, Std. beta = -1.75)
#>   - The interaction effect of Species [versicolor] on Petal Length is statistically non-significant and positive (beta = 0.29, 95% CI [-0.30, 0.87], t(144) = 0.97, p = 0.334, Std. beta = 0.61)
#>   - The interaction effect of Species [virginica] on Petal Length is statistically non-significant and positive (beta = 0.45, 95% CI [-0.12, 1.03], t(144) = 1.56, p = 0.120, Std. beta = 0.97)
as.data.frame(r)
#> Parameter                           | Coefficient |         95% CI | t(144) |      p | Std. Coef. | Std. Coef. 95% CI |    Fit
#> ------------------------------------------------------------------------------------------------------------------------------
#> (Intercept)                         |        4.21 | [ 3.41,  5.02] |  10.34 | < .001 |       0.49 |    [-1.03,  2.01] |       
#> Petal Length                        |        0.54 | [ 0.00,  1.09] |   1.96 | 0.052  |       1.16 |    [-0.01,  2.32] |       
#> Species [versicolor]                |       -1.81 | [-2.99, -0.62] |  -3.02 | 0.003  |      -0.88 |    [-2.41,  0.65] |       
#> Species [virginica]                 |       -3.15 | [-4.41, -1.90] |  -4.97 | < .001 |      -1.75 |    [-3.32, -0.18] |       
#> Petal Length * Species [versicolor] |        0.29 | [-0.30,  0.87] |   0.97 | 0.334  |       0.61 |    [-0.63,  1.85] |       
#> Petal Length * Species [virginica]  |        0.45 | [-0.12,  1.03] |   1.56 | 0.120  |       0.97 |    [-0.26,  2.19] |       
#>                                     |             |                |        |        |            |                   |       
#> AIC                                 |             |                |        |        |            |                   | 106.77
#> BIC                                 |             |                |        |        |            |                   | 127.84
#> R2                                  |             |                |        |        |            |                   |   0.84
#> R2 (adj.)                           |             |                |        |        |            |                   |   0.83
#> Sigma                               |             |                |        |        |            |                   |   0.34
summary(as.data.frame(r))
#> Parameter                           | Coefficient |         95% CI | t(144) |      p | Std. Coef. |  Fit
#> --------------------------------------------------------------------------------------------------------
#> (Intercept)                         |        4.21 | [ 3.41,  5.02] |  10.34 | < .001 |       0.49 |     
#> Petal Length                        |        0.54 | [ 0.00,  1.09] |   1.96 | 0.052  |       1.16 |     
#> Species [versicolor]                |       -1.81 | [-2.99, -0.62] |  -3.02 | 0.003  |      -0.88 |     
#> Species [virginica]                 |       -3.15 | [-4.41, -1.90] |  -4.97 | < .001 |      -1.75 |     
#> Petal Length * Species [versicolor] |        0.29 | [-0.30,  0.87] |   0.97 | 0.334  |       0.61 |     
#> Petal Length * Species [virginica]  |        0.45 | [-0.12,  1.03] |   1.56 | 0.120  |       0.97 |     
#>                                     |             |                |        |        |            |     
#> R2                                  |             |                |        |        |            | 0.84
#> R2 (adj.)                           |             |                |        |        |            | 0.83
#> Sigma                               |             |                |        |        |            | 0.34