Learn R Programming

pprof (version 1.0.3)

summary.linear_cre: Result Summaries of Covariate Estimates from a fitted linear_fe, linear_re or linear_cre object

Description

Provide the summary statistics for the covariate estimates for a fixed/random/correlated random effect linear model.

Usage

# S3 method for linear_cre
summary(object, parm, level = 0.95, null = 0, ...)

# S3 method for linear_fe summary(object, parm, level = 0.95, null = 0, ...)

# S3 method for linear_re summary(object, parm, level = 0.95, null = 0, ...)

Value

A data frame containing summary statistics for covariate estimates, with the following columns:

Estimate

the estimates of covariate coefficients.

Std.Error

the standard error of the estimate.

Stat

the test statistic.

p value

the p-value for the hypothesis test.

CI.upper

the lower bound of the confidence interval.

CI.lower

the upper bound of the confidence interval.

Arguments

object

a model fitted from linear_fe or linear_re or linear_cre.

parm

specifies a subset of covariates for which the result summaries should be output. By default, all covariates are included.

level

the confidence level during the hypothesis test, meaning a significance level of \(1 - \text{level}\). The default value is 0.95.

null

a number defining the null hypothesis for the covariate estimates. The default value is 0.

...

additional arguments that can be passed to the function.

Examples

Run this code
data(ExampleDataLinear)
outcome <- ExampleDataLinear$Y
covar <- ExampleDataLinear$Z
ProvID <- ExampleDataLinear$ProvID
data <- data.frame(outcome, ProvID, covar)
outcome.char <- colnames(data)[1]
ProvID.char <- colnames(data)[2]
wb.char <- c("z1", "z2")
other.char <- c("z3", "z4", "z5")
fit_cre <- linear_cre(data = data, Y.char = outcome.char, ProvID.char = ProvID.char,
wb.char = wb.char, other.char = other.char)
summary(fit_cre)

data(ExampleDataLinear)
outcome <- ExampleDataLinear$Y
covar <- ExampleDataLinear$Z
ProvID <- ExampleDataLinear$ProvID
fit_fe <- linear_fe(Y = outcome, Z = covar, ProvID = ProvID)
summary(fit_fe)

data(ExampleDataLinear)
outcome <- ExampleDataLinear$Y
covar <- ExampleDataLinear$Z
ProvID <- ExampleDataLinear$ProvID
fit_re <- linear_fe(Y = outcome, Z = covar, ProvID = ProvID)
summary(fit_re)

Run the code above in your browser using DataLab