Skip to contents

Calculates standard error, t-test values, and p-values for each parameter estimate.

Usage

# S3 method for class 'my_lm'
summary(object, ...)

# S3 method for class 'summary.my_lm'
print(x, ...)

Arguments

object

An object with the class of my_lm.

...

Additional options.

x

An object with the class of summary.my_lm.

Value

An object of class summary.my_lm that contains:

  • est_mat: A matrix with the following named columns...

    • Estimate: The parameter (beta) estimated values

    • Std. Err: The standard error values for the parameter estimates.

    • t value: The t-test value for the parameter estimate.

    • Pr(>|t|): The p-value for the t-test value on the parameter.

  • call: Information on how the my_lm() function was called.

See also

my_lm(), print.summary.my_lm()

Examples

# Compute the model
model = my_lm(mpg ~ disp, data = mtcars)

# Calculate the inference values
model_inference = summary(model)

# Display inference values
model_inference
#> Call:
#> my_lm.formula(formula = mpg ~ disp, data = mtcars)
#> 
#>               Estimate   Std. Err t value  Pr(>|t|)    
#> (Intercept) 29.5998548  1.2297195 24.0704 < 2.2e-16 ***
#> disp        -0.0412151  0.0047118 -8.7472  9.38e-10 ***
#> ---
#> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1