Description Usage Arguments Details Value See Also Examples
Extract sValues Model Coefficients/Statistics
1 2 3 4 5 6 7 8 9 10 |
object |
an object of class |
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. |
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)
.
The function returns a data.frame
with the estimates for each variable.
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]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.