coef.BranchGLM: Extract Coefficients from BranchGLM Objects

View source: R/BranchGLM.R

coef.BranchGLMR Documentation

Extract Coefficients from BranchGLM Objects

Description

Extracts beta coefficients from BranchGLM objects.

Usage

## S3 method for class 'BranchGLM'
coef(object, type = "estimates", ...)

Arguments

object

a BranchGLM object.

type

"estimates" to only return the coefficient estimates or "all" to return the estimates along with SEs, test statistics, and p-values.

...

further arguments passed to or from other methods.

Value

A named vector with the corresponding coefficient estimates or a data.frame with the coefficient estimates along with SEs, test statistics, and p-values.

Examples

Data <- iris

# Linear regression model
Fit <- BranchGLM(Sepal.Length ~ ., data = Data, family = "gaussian", link = "identity")
Fit

# Getting only coefficient estimates
coef(Fit, type = "estimates")

# Getting coefficient estimates along with SEs, tests, and p-values
coef(Fit, type = "all")


BranchGLM documentation built on Sept. 28, 2024, 9:07 a.m.