View source: R/distributional_uncertainty.R
calm | R Documentation |
Calibrated inference for linear models
calm(formulas, data, target, ...)
formulas |
A list of formulas |
data |
A dataframe containing the variables in the model |
n <- 1000 X <- rnorm(n) Z1 <- rnorm(n) Z2 <- rnorm(n) Y <- 1*X + X^2 + Z1 + Z2 + rnorm(n) df <- data.frame(cbind(X,Y,Z1,Z2)) data <- as.data.frame(cbind(Y,X)) formulas <- list(Y~X, Y ~ X + I(X^2), Y ~ X + Z1, Y ~ X + Z2 + I(X^2), Y ~ X + Z1 + Z2 + I(X^2)) calm(formulas,data=data, target="X") summary(lm(Y ~ X + Z1 + Z2 + I(X^2), data=df))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.