Description Usage Arguments Value Examples
Computes standardized coefficient for a regression or time series. Three scores are returned:
"Coef:" This returns the original coefficient β.
"SdChange" A one standard deviation in the independent variable is linked to percentage increase in the dependent variable. Hence, it is β var(β).
"StdCoef:" Returns the standardized coefficent. It is calculated through β var(β) / var(y) where y is independent variable.
1 2 3 4 5 6 7 8 9 10 11 12 13 | standardizeCoefficients(model, hide = NULL)
## S3 method for class 'lm'
standardizeCoefficients(model, hide = NULL)
## S3 method for class 'rq'
standardizeCoefficients(model, hide = NULL)
## S3 method for class 'varest'
standardizeCoefficients(model, hide = NULL)
## S3 method for class 'svarest'
standardizeCoefficients(model, hide = NULL)
|
model |
Model. Supported types are linear models ( |
hide |
A string. All variables starting with that name are excluded. |
Coefficients (with transformations) for model variables. In case of multivariate models, it returns a list with an element for each dependent variable.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | library(dplyr)
library(vars)
data(Canada)
prod <- differences(as.numeric(Canada[, 2]))
production <- data.frame(Prod = prod, Lag1 = dplyr::lag(prod), Lag2 = dplyr::lag(prod, 2))
m <- lm(Prod ~ Lag1, data = production)
standardizeCoefficients(m)
m <- lm(Prod ~ Lag1 + Lag2, data = production)
standardizeCoefficients(m)
var.2c <- VAR(Canada, p = 2, type = "none")
standardizeCoefficients(var.2c$varresult$e)
std <- standardizeCoefficients(var.2c)
std$e
library(quantreg)
data(stackloss)
qr <- rq(stack.loss ~ stack.x, 0.25)
standardizeCoefficients(qr)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.