summary_lm: Compute Inference for Custom Linear Regression

summary.my_lmR Documentation

Compute Inference for Custom Linear Regression

Description

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


r-pkg-examples/r-s3-lm documentation built on Oct. 28, 2024, 12:20 a.m.