# NOT RUN {
# feel free to ignore the following line<U+2014>it allows {broom} to supply
# examples without requiring the model-supplying package to be installed.
if (requireNamespace("systemfit", quietly = TRUE)) {
set.seed(27)
# load libraries for models and data
library(systemfit)
# generate data
df <- data.frame(
X = rnorm(100),
Y = rnorm(100),
Z = rnorm(100),
W = rnorm(100)
)
# fit model
fit <- systemfit(formula = list(Y ~ Z, W ~ X), data = df, method = "SUR")
# summarize model fit with tidiers
tidy(fit)
tidy(fit, conf.int = TRUE)
}
# }
Run the code above in your browser using DataLab