coef.sValues: Extract sValues Model Coefficients/Statistics

Description Usage Arguments Details Value See Also Examples

View source: R/sValues.R

Description

Extract sValues Model Coefficients/Statistics

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## S3 method for class 'sValues'
coef(object, type = "default", ...)

betas(object)

t_values(object)

s_values(object)

extreme_bounds(object)

Arguments

object

an object of class sValues.

type

which coefficient/statistic to extract? Current options are "betas", "t_values", "s_values", "extreme_bounds" and "default". See details.

...

further arguments passed to or from other methods.

Details

For the coef function, the default is to extract the beta coefficients, t-values and s-values. You can can get each one of those individually by setting type to either "betas", "t_values" or "s_values". You can also get the extreme bounds of the estimates by setting type to "extreme_bounds". Finally, you can set type = "all" to get everything.

For each option of coef, there is an alternative helper function with the same name. That is, coef(x, "betas") is equivalent to betas(x), or coef(x, "extreme_bounds") is equivalent to extreme_bounds(x).

Value

The function returns a data.frame with the estimates for each variable.

See Also

summary.sValues.

Examples

1
2
3
4
5
6
7
8
9
data(economic_growth)
eg_sv <- sValues(GR6096 ~ ., data = economic_growth)
eg_betas <- coef(eg_sv, "betas")
eg_t_values <- coef(eg_sv, "t_values")
eg_s_values <- coef(eg_sv, "s_values")
eg_ext_bounds <- coef(eg_sv, "extreme_bounds")

# get sturdy estimates for R2 bounds 0.5 - 1
eg_s_values[abs(eg_s_values[3]) > 1, 3, drop = FALSE]

sValues documentation built on July 16, 2018, 1:04 a.m.