rockchalk
Regression Estimation and Presentation
Description
A collection of functions for interpretation and presentation of regression analysis. These functions are used to produce the statistics lectures in <https://pj.freefaculty.org/guides/>. Includes regression diagnostics, regression tables, and plots of interactions and "moderator" variables. The emphasis is on "mean-centered" and "residual-centered" predictors. The vignette 'rockchalk' offers a fairly comprehensive overview. The vignette 'Rstyle' has advice about coding in R. The package title 'rockchalk' refers to our school motto, 'Rock Chalk Jayhawk, Go K.U.'.
Downloads
16.1K
Last 30 days
966th
45K
Last 90 days
192.1K
Last year
Trend: +9.5% (30d vs prior 30d)
CRAN Check Status
Show all 14 flavors
| Flavor | Status |
|---|---|
| r-devel-linux-x86_64-debian-clang | ERROR |
| r-devel-linux-x86_64-debian-gcc | ERROR |
| r-devel-linux-x86_64-fedora-clang | ERROR |
| r-devel-linux-x86_64-fedora-gcc | ERROR |
| r-devel-macos-arm64 | ERROR |
| r-devel-windows-x86_64 | ERROR |
| r-oldrel-macos-arm64 | NOTE |
| r-oldrel-macos-x86_64 | NOTE |
| r-oldrel-windows-x86_64 | ERROR |
| r-patched-linux-x86_64 | ERROR |
| r-release-linux-x86_64 | ERROR |
| r-release-macos-arm64 | NOTE |
| r-release-macos-x86_64 | NOTE |
| r-release-windows-x86_64 | ERROR |
Check details (24 non-OK)
Rd files
checkRd: (-1) descriptiveTable.Rd:18: Lost braces
18 | other object type that does not fail in code{model.frame(object)}.}
| ^
examples
Running examples in ‘rockchalk-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: outreg
> ### Title: Creates a publication quality result table for regression
> ### models. Works with models fitted with lm, glm, as well as lme4.
> ### Aliases: outreg
> ### Keywords: regression
>
> ### ** Examples
>
> set.seed(2134234)
> dat <- data.frame(x1 = rnorm(100), x2 = rnorm(100))
> dat$y1 <- 30 + 5 * rnorm(100) + 3 * dat$x1 + 4 * dat$x2
> dat$y2 <- rnorm(100) + 5 * dat$x2
> m1 <- lm(y1 ~ x1, data = dat)
> m2 <- lm(y1 ~ x2, data = dat)
> m3 <- lm(y1 ~ x1 + x2, data = dat)
> gm1 <- glm(y1 ~ x1, family = Gamma, data = dat)
> outreg(m1, title = "My One Tightly Printed Regression", float = TRUE)
\begin{table}
\caption{My One Tightly Printed Regression}\label{regrlabl}
\begin{tabular}{@{}l*{2}{l}@{}}
\hline
&\multicolumn{1}{l}{M1 }\tabularnewline
&\multicolumn{1}{l}{Estimate}\tabularnewline
&\multicolumn{1}{l}{(S.E.)}\tabu
...[truncated]...
epstudy)
+ ex18 <- outreg(fm1)
+ cat(ex18)
+ ## Fit same with lm for comparison
+ lm1 <- lm(Reaction ~ Days, sleepstudy)
+ ## Get robust standard errors
+ lm1rse <- sqrt(diag(car::hccm(lm1)))
+
+ if(interactive()){
+ ex19 <- outreg(list("Random Effects" = fm1,
+ "OLS" = lm1, "OLS Robust SE" = lm1),
+ SElist = list("OLS Robust SE" = lm1rse), type = "html")
+ }
+ ## From the glmer examples
+ gm2 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd),
+ data = cbpp, family = binomial)
+ lm2 <- lm(incidence/size ~ period, data = cbpp)
+ lm2rse <- sqrt(diag(car::hccm(lm2)))
+ ## Lets see what MASS::rlm objects do? Mostly OK
+ rlm2 <- MASS::rlm(incidence/size ~ period, data = cbpp)
+
+ }
Loading required package: lme4
Loading required package: Matrix
Error in get(x, envir = ns, inherits = FALSE) :
object 'formatVC' not found
Calls: outreg ... getVCmat -> lapply -> FUN -> getFromNamespace -> get
Execution halted
Rd files
checkRd: (-1) descriptiveTable.Rd:18: Lost braces
18 | other object type that does not fail in code{model.frame(object)}.}
| ^
examples
Running examples in ‘rockchalk-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: outreg
> ### Title: Creates a publication quality result table for regression
> ### models. Works with models fitted with lm, glm, as well as lme4.
> ### Aliases: outreg
> ### Keywords: regression
>
> ### ** Examples
>
> set.seed(2134234)
> dat <- data.frame(x1 = rnorm(100), x2 = rnorm(100))
> dat$y1 <- 30 + 5 * rnorm(100) + 3 * dat$x1 + 4 * dat$x2
> dat$y2 <- rnorm(100) + 5 * dat$x2
> m1 <- lm(y1 ~ x1, data = dat)
> m2 <- lm(y1 ~ x2, data = dat)
> m3 <- lm(y1 ~ x1 + x2, data = dat)
> gm1 <- glm(y1 ~ x1, family = Gamma, data = dat)
> outreg(m1, title = "My One Tightly Printed Regression", float = TRUE)
\begin{table}
\caption{My One Tightly Printed Regression}\label{regrlabl}
\begin{tabular}{@{}l*{2}{l}@{}}
\hline
&\multicolumn{1}{l}{M1 }\tabularnewline
&\multicolumn{1}{l}{Estimate}\tabularnewline
&\multicolumn{1}{l}{(S.E.)}\tabu
...[truncated]...
epstudy)
+ ex18 <- outreg(fm1)
+ cat(ex18)
+ ## Fit same with lm for comparison
+ lm1 <- lm(Reaction ~ Days, sleepstudy)
+ ## Get robust standard errors
+ lm1rse <- sqrt(diag(car::hccm(lm1)))
+
+ if(interactive()){
+ ex19 <- outreg(list("Random Effects" = fm1,
+ "OLS" = lm1, "OLS Robust SE" = lm1),
+ SElist = list("OLS Robust SE" = lm1rse), type = "html")
+ }
+ ## From the glmer examples
+ gm2 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd),
+ data = cbpp, family = binomial)
+ lm2 <- lm(incidence/size ~ period, data = cbpp)
+ lm2rse <- sqrt(diag(car::hccm(lm2)))
+ ## Lets see what MASS::rlm objects do? Mostly OK
+ rlm2 <- MASS::rlm(incidence/size ~ period, data = cbpp)
+
+ }
Loading required package: lme4
Loading required package: Matrix
Error in get(x, envir = ns, inherits = FALSE) :
object 'formatVC' not found
Calls: outreg ... getVCmat -> lapply -> FUN -> getFromNamespace -> get
Execution halted
Rd files
checkRd: (-1) descriptiveTable.Rd:18: Lost braces
18 | other object type that does not fail in code{model.frame(object)}.}
| ^
examples
Running examples in ‘rockchalk-Ex.R’ failed
The error most likely occurred in:
> ### Name: outreg
> ### Title: Creates a publication quality result table for regression
> ### models. Works with models fitted with lm, glm, as well as lme4.
> ### Aliases: outreg
> ### Keywords: regression
>
> ### ** Examples
>
> set.seed(2134234)
> dat <- data.frame(x1 = rnorm(100), x2 = rnorm(100))
> dat$y1 <- 30 + 5 * rnorm(100) + 3 * dat$x1 + 4 * dat$x2
> dat$y2 <- rnorm(100) + 5 * dat$x2
> m1 <- lm(y1 ~ x1, data = dat)
> m2 <- lm(y1 ~ x2, data = dat)
> m3 <- lm(y1 ~ x1 + x2, data = dat)
> gm1 <- glm(y1 ~ x1, family = Gamma, data = dat)
> outreg(m1, title = "My One Tightly Printed Regression", float = TRUE)
\begin{table}
\caption{My One Tightly Printed Regression}\label{regrlabl}
\begin{tabular}{@{}l*{2}{l}@{}}
\hline
&\multicolumn{1}{l}{M1 }\tabularnewline
&\multicolumn{1}{l}{Estimate}\tabularnewline
&\multicolumn{1}{l}{(S.E.)}\tabularnewline
\hline
\hline
(Intercept) & 30.245*** \tabu
...[truncated]...
epstudy)
+ ex18 <- outreg(fm1)
+ cat(ex18)
+ ## Fit same with lm for comparison
+ lm1 <- lm(Reaction ~ Days, sleepstudy)
+ ## Get robust standard errors
+ lm1rse <- sqrt(diag(car::hccm(lm1)))
+
+ if(interactive()){
+ ex19 <- outreg(list("Random Effects" = fm1,
+ "OLS" = lm1, "OLS Robust SE" = lm1),
+ SElist = list("OLS Robust SE" = lm1rse), type = "html")
+ }
+ ## From the glmer examples
+ gm2 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd),
+ data = cbpp, family = binomial)
+ lm2 <- lm(incidence/size ~ period, data = cbpp)
+ lm2rse <- sqrt(diag(car::hccm(lm2)))
+ ## Lets see what MASS::rlm objects do? Mostly OK
+ rlm2 <- MASS::rlm(incidence/size ~ period, data = cbpp)
+
+ }
Loading required package: lme4
Loading required package: Matrix
Error in get(x, envir = ns, inherits = FALSE) :
object 'formatVC' not found
Calls: outreg ... getVCmat -> lapply -> FUN -> getFromNamespace -> get
Execution halted
Rd files
checkRd: (-1) descriptiveTable.Rd:18: Lost braces
18 | other object type that does not fail in code{model.frame(object)}.}
| ^
examples
Running examples in ‘rockchalk-Ex.R’ failed
The error most likely occurred in:
> ### Name: outreg
> ### Title: Creates a publication quality result table for regression
> ### models. Works with models fitted with lm, glm, as well as lme4.
> ### Aliases: outreg
> ### Keywords: regression
>
> ### ** Examples
>
> set.seed(2134234)
> dat <- data.frame(x1 = rnorm(100), x2 = rnorm(100))
> dat$y1 <- 30 + 5 * rnorm(100) + 3 * dat$x1 + 4 * dat$x2
> dat$y2 <- rnorm(100) + 5 * dat$x2
> m1 <- lm(y1 ~ x1, data = dat)
> m2 <- lm(y1 ~ x2, data = dat)
> m3 <- lm(y1 ~ x1 + x2, data = dat)
> gm1 <- glm(y1 ~ x1, family = Gamma, data = dat)
> outreg(m1, title = "My One Tightly Printed Regression", float = TRUE)
\begin{table}
\caption{My One Tightly Printed Regression}\label{regrlabl}
\begin{tabular}{@{}l*{2}{l}@{}}
\hline
&\multicolumn{1}{l}{M1 }\tabularnewline
&\multicolumn{1}{l}{Estimate}\tabularnewline
&\multicolumn{1}{l}{(S.E.)}\tabularnewline
\hline
\hline
(Intercept) & 30.245*** \tabu
...[truncated]...
epstudy)
+ ex18 <- outreg(fm1)
+ cat(ex18)
+ ## Fit same with lm for comparison
+ lm1 <- lm(Reaction ~ Days, sleepstudy)
+ ## Get robust standard errors
+ lm1rse <- sqrt(diag(car::hccm(lm1)))
+
+ if(interactive()){
+ ex19 <- outreg(list("Random Effects" = fm1,
+ "OLS" = lm1, "OLS Robust SE" = lm1),
+ SElist = list("OLS Robust SE" = lm1rse), type = "html")
+ }
+ ## From the glmer examples
+ gm2 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd),
+ data = cbpp, family = binomial)
+ lm2 <- lm(incidence/size ~ period, data = cbpp)
+ lm2rse <- sqrt(diag(car::hccm(lm2)))
+ ## Lets see what MASS::rlm objects do? Mostly OK
+ rlm2 <- MASS::rlm(incidence/size ~ period, data = cbpp)
+
+ }
Loading required package: lme4
Loading required package: Matrix
Error in get(x, envir = ns, inherits = FALSE) :
object 'formatVC' not found
Calls: outreg ... getVCmat -> lapply -> FUN -> getFromNamespace -> get
Execution halted
Rd files
checkRd: (-1) descriptiveTable.Rd:18: Lost braces
18 | other object type that does not fail in code{model.frame(object)}.}
| ^
examples
Running examples in ‘rockchalk-Ex.R’ failed
The error most likely occurred in:
> ### Name: outreg
> ### Title: Creates a publication quality result table for regression
> ### models. Works with models fitted with lm, glm, as well as lme4.
> ### Aliases: outreg
> ### Keywords: regression
>
> ### ** Examples
>
> set.seed(2134234)
> dat <- data.frame(x1 = rnorm(100), x2 = rnorm(100))
> dat$y1 <- 30 + 5 * rnorm(100) + 3 * dat$x1 + 4 * dat$x2
> dat$y2 <- rnorm(100) + 5 * dat$x2
> m1 <- lm(y1 ~ x1, data = dat)
> m2 <- lm(y1 ~ x2, data = dat)
> m3 <- lm(y1 ~ x1 + x2, data = dat)
> gm1 <- glm(y1 ~ x1, family = Gamma, data = dat)
> outreg(m1, title = "My One Tightly Printed Regression", float = TRUE)
\begin{table}
\caption{My One Tightly Printed Regression}\label{regrlabl}
\begin{tabular}{@{}l*{2}{l}@{}}
\hline
&\multicolumn{1}{l}{M1 }\tabularnewline
&\multicolumn{1}{l}{Estimate}\tabularnewline
&\multicolumn{1}{l}{(S.E.)}\tabularnewline
\hline
\hline
(Intercept) & 30.245*** \tabu
...[truncated]...
epstudy)
+ ex18 <- outreg(fm1)
+ cat(ex18)
+ ## Fit same with lm for comparison
+ lm1 <- lm(Reaction ~ Days, sleepstudy)
+ ## Get robust standard errors
+ lm1rse <- sqrt(diag(car::hccm(lm1)))
+
+ if(interactive()){
+ ex19 <- outreg(list("Random Effects" = fm1,
+ "OLS" = lm1, "OLS Robust SE" = lm1),
+ SElist = list("OLS Robust SE" = lm1rse), type = "html")
+ }
+ ## From the glmer examples
+ gm2 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd),
+ data = cbpp, family = binomial)
+ lm2 <- lm(incidence/size ~ period, data = cbpp)
+ lm2rse <- sqrt(diag(car::hccm(lm2)))
+ ## Lets see what MASS::rlm objects do? Mostly OK
+ rlm2 <- MASS::rlm(incidence/size ~ period, data = cbpp)
+
+ }
Loading required package: lme4
Loading required package: Matrix
Error in get(x, envir = ns, inherits = FALSE) :
object 'formatVC' not found
Calls: outreg ... getVCmat -> lapply -> FUN -> getFromNamespace -> get
Execution halted
Rd files
checkRd: (-1) descriptiveTable.Rd:18: Lost braces
18 | other object type that does not fail in code{model.frame(object)}.}
| ^
examples
Running examples in 'rockchalk-Ex.R' failed
The error most likely occurred in:
> ### Name: outreg
> ### Title: Creates a publication quality result table for regression
> ### models. Works with models fitted with lm, glm, as well as lme4.
> ### Aliases: outreg
> ### Keywords: regression
>
> ### ** Examples
>
> set.seed(2134234)
> dat <- data.frame(x1 = rnorm(100), x2 = rnorm(100))
> dat$y1 <- 30 + 5 * rnorm(100) + 3 * dat$x1 + 4 * dat$x2
> dat$y2 <- rnorm(100) + 5 * dat$x2
> m1 <- lm(y1 ~ x1, data = dat)
> m2 <- lm(y1 ~ x2, data = dat)
> m3 <- lm(y1 ~ x1 + x2, data = dat)
> gm1 <- glm(y1 ~ x1, family = Gamma, data = dat)
> outreg(m1, title = "My One Tightly Printed Regression", float = TRUE)
\begin{table}
\caption{My One Tightly Printed Regression}\label{regrlabl}
\begin{tabular}{@{}l*{2}{l}@{}}
\hline
&\multicolumn{1}{l}{M1 }\tabularnewline
&\multicolumn{1}{l}{Estimate}\tabularnewline
&\multicolumn{1}{l}{(S.E.)}\tabularnewline
\hline
\hline
(Intercept) & 30.245*** \tabu
...[truncated]...
epstudy)
+ ex18 <- outreg(fm1)
+ cat(ex18)
+ ## Fit same with lm for comparison
+ lm1 <- lm(Reaction ~ Days, sleepstudy)
+ ## Get robust standard errors
+ lm1rse <- sqrt(diag(car::hccm(lm1)))
+
+ if(interactive()){
+ ex19 <- outreg(list("Random Effects" = fm1,
+ "OLS" = lm1, "OLS Robust SE" = lm1),
+ SElist = list("OLS Robust SE" = lm1rse), type = "html")
+ }
+ ## From the glmer examples
+ gm2 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd),
+ data = cbpp, family = binomial)
+ lm2 <- lm(incidence/size ~ period, data = cbpp)
+ lm2rse <- sqrt(diag(car::hccm(lm2)))
+ ## Lets see what MASS::rlm objects do? Mostly OK
+ rlm2 <- MASS::rlm(incidence/size ~ period, data = cbpp)
+
+ }
Loading required package: lme4
Loading required package: Matrix
Error in get(x, envir = ns, inherits = FALSE) :
object 'formatVC' not found
Calls: outreg ... getVCmat -> lapply -> FUN -> getFromNamespace -> get
Execution halted
Rd files
checkRd: (-1) descriptiveTable.Rd:18: Lost braces
18 | other object type that does not fail in code{model.frame(object)}.}
| ^
Rd files
checkRd: (-1) descriptiveTable.Rd:18: Lost braces
18 | other object type that does not fail in code{model.frame(object)}.}
| ^
Rd files
checkRd: (-1) descriptiveTable.Rd:18: Lost braces
18 | other object type that does not fail in code{model.frame(object)}.}
| ^
examples
Running examples in 'rockchalk-Ex.R' failed
The error most likely occurred in:
> ### Name: outreg
> ### Title: Creates a publication quality result table for regression
> ### models. Works with models fitted with lm, glm, as well as lme4.
> ### Aliases: outreg
> ### Keywords: regression
>
> ### ** Examples
>
> set.seed(2134234)
> dat <- data.frame(x1 = rnorm(100), x2 = rnorm(100))
> dat$y1 <- 30 + 5 * rnorm(100) + 3 * dat$x1 + 4 * dat$x2
> dat$y2 <- rnorm(100) + 5 * dat$x2
> m1 <- lm(y1 ~ x1, data = dat)
> m2 <- lm(y1 ~ x2, data = dat)
> m3 <- lm(y1 ~ x1 + x2, data = dat)
> gm1 <- glm(y1 ~ x1, family = Gamma, data = dat)
> outreg(m1, title = "My One Tightly Printed Regression", float = TRUE)
\begin{table}
\caption{My One Tightly Printed Regression}\label{regrlabl}
\begin{tabular}{@{}l*{2}{l}@{}}
\hline
&\multicolumn{1}{l}{M1 }\tabularnewline
&\multicolumn{1}{l}{Estimate}\tabularnewline
&\multicolumn{1}{l}{(S.E.)}\tabularnewline
\hline
\hline
(Intercept) & 30.245*** \tabu
...[truncated]...
epstudy)
+ ex18 <- outreg(fm1)
+ cat(ex18)
+ ## Fit same with lm for comparison
+ lm1 <- lm(Reaction ~ Days, sleepstudy)
+ ## Get robust standard errors
+ lm1rse <- sqrt(diag(car::hccm(lm1)))
+
+ if(interactive()){
+ ex19 <- outreg(list("Random Effects" = fm1,
+ "OLS" = lm1, "OLS Robust SE" = lm1),
+ SElist = list("OLS Robust SE" = lm1rse), type = "html")
+ }
+ ## From the glmer examples
+ gm2 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd),
+ data = cbpp, family = binomial)
+ lm2 <- lm(incidence/size ~ period, data = cbpp)
+ lm2rse <- sqrt(diag(car::hccm(lm2)))
+ ## Lets see what MASS::rlm objects do? Mostly OK
+ rlm2 <- MASS::rlm(incidence/size ~ period, data = cbpp)
+
+ }
Loading required package: lme4
Loading required package: Matrix
Error in get(x, envir = ns, inherits = FALSE) :
object 'formatVC' not found
Calls: outreg ... getVCmat -> lapply -> FUN -> getFromNamespace -> get
Execution halted
Rd files
checkRd: (-1) descriptiveTable.Rd:18: Lost braces
18 | other object type that does not fail in code{model.frame(object)}.}
| ^
examples
Running examples in ‘rockchalk-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: outreg
> ### Title: Creates a publication quality result table for regression
> ### models. Works with models fitted with lm, glm, as well as lme4.
> ### Aliases: outreg
> ### Keywords: regression
>
> ### ** Examples
>
> set.seed(2134234)
> dat <- data.frame(x1 = rnorm(100), x2 = rnorm(100))
> dat$y1 <- 30 + 5 * rnorm(100) + 3 * dat$x1 + 4 * dat$x2
> dat$y2 <- rnorm(100) + 5 * dat$x2
> m1 <- lm(y1 ~ x1, data = dat)
> m2 <- lm(y1 ~ x2, data = dat)
> m3 <- lm(y1 ~ x1 + x2, data = dat)
> gm1 <- glm(y1 ~ x1, family = Gamma, data = dat)
> outreg(m1, title = "My One Tightly Printed Regression", float = TRUE)
\begin{table}
\caption{My One Tightly Printed Regression}\label{regrlabl}
\begin{tabular}{@{}l*{2}{l}@{}}
\hline
&\multicolumn{1}{l}{M1 }\tabularnewline
&\multicolumn{1}{l}{Estimate}\tabularnewline
&\multicolumn{1}{l}{(S.E.)}\tabu
...[truncated]...
epstudy)
+ ex18 <- outreg(fm1)
+ cat(ex18)
+ ## Fit same with lm for comparison
+ lm1 <- lm(Reaction ~ Days, sleepstudy)
+ ## Get robust standard errors
+ lm1rse <- sqrt(diag(car::hccm(lm1)))
+
+ if(interactive()){
+ ex19 <- outreg(list("Random Effects" = fm1,
+ "OLS" = lm1, "OLS Robust SE" = lm1),
+ SElist = list("OLS Robust SE" = lm1rse), type = "html")
+ }
+ ## From the glmer examples
+ gm2 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd),
+ data = cbpp, family = binomial)
+ lm2 <- lm(incidence/size ~ period, data = cbpp)
+ lm2rse <- sqrt(diag(car::hccm(lm2)))
+ ## Lets see what MASS::rlm objects do? Mostly OK
+ rlm2 <- MASS::rlm(incidence/size ~ period, data = cbpp)
+
+ }
Loading required package: lme4
Loading required package: Matrix
Error in get(x, envir = ns, inherits = FALSE) :
object 'formatVC' not found
Calls: outreg ... getVCmat -> lapply -> FUN -> getFromNamespace -> get
Execution halted
Rd files
checkRd: (-1) descriptiveTable.Rd:18: Lost braces
18 | other object type that does not fail in code{model.frame(object)}.}
| ^
examples
Running examples in ‘rockchalk-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: outreg
> ### Title: Creates a publication quality result table for regression
> ### models. Works with models fitted with lm, glm, as well as lme4.
> ### Aliases: outreg
> ### Keywords: regression
>
> ### ** Examples
>
> set.seed(2134234)
> dat <- data.frame(x1 = rnorm(100), x2 = rnorm(100))
> dat$y1 <- 30 + 5 * rnorm(100) + 3 * dat$x1 + 4 * dat$x2
> dat$y2 <- rnorm(100) + 5 * dat$x2
> m1 <- lm(y1 ~ x1, data = dat)
> m2 <- lm(y1 ~ x2, data = dat)
> m3 <- lm(y1 ~ x1 + x2, data = dat)
> gm1 <- glm(y1 ~ x1, family = Gamma, data = dat)
> outreg(m1, title = "My One Tightly Printed Regression", float = TRUE)
\begin{table}
\caption{My One Tightly Printed Regression}\label{regrlabl}
\begin{tabular}{@{}l*{2}{l}@{}}
\hline
&\multicolumn{1}{l}{M1 }\tabularnewline
&\multicolumn{1}{l}{Estimate}\tabularnewline
&\multicolumn{1}{l}{(S.E.)}\tabu
...[truncated]...
epstudy)
+ ex18 <- outreg(fm1)
+ cat(ex18)
+ ## Fit same with lm for comparison
+ lm1 <- lm(Reaction ~ Days, sleepstudy)
+ ## Get robust standard errors
+ lm1rse <- sqrt(diag(car::hccm(lm1)))
+
+ if(interactive()){
+ ex19 <- outreg(list("Random Effects" = fm1,
+ "OLS" = lm1, "OLS Robust SE" = lm1),
+ SElist = list("OLS Robust SE" = lm1rse), type = "html")
+ }
+ ## From the glmer examples
+ gm2 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd),
+ data = cbpp, family = binomial)
+ lm2 <- lm(incidence/size ~ period, data = cbpp)
+ lm2rse <- sqrt(diag(car::hccm(lm2)))
+ ## Lets see what MASS::rlm objects do? Mostly OK
+ rlm2 <- MASS::rlm(incidence/size ~ period, data = cbpp)
+
+ }
Loading required package: lme4
Loading required package: Matrix
Error in get(x, envir = ns, inherits = FALSE) :
object 'formatVC' not found
Calls: outreg ... getVCmat -> lapply -> FUN -> getFromNamespace -> get
Execution halted
Rd files
checkRd: (-1) descriptiveTable.Rd:18: Lost braces
18 | other object type that does not fail in code{model.frame(object)}.}
| ^
Rd files
checkRd: (-1) descriptiveTable.Rd:18: Lost braces
18 | other object type that does not fail in code{model.frame(object)}.}
| ^
Rd files
checkRd: (-1) descriptiveTable.Rd:18: Lost braces
18 | other object type that does not fail in code{model.frame(object)}.}
| ^
examples
Running examples in 'rockchalk-Ex.R' failed
The error most likely occurred in:
> ### Name: outreg
> ### Title: Creates a publication quality result table for regression
> ### models. Works with models fitted with lm, glm, as well as lme4.
> ### Aliases: outreg
> ### Keywords: regression
>
> ### ** Examples
>
> set.seed(2134234)
> dat <- data.frame(x1 = rnorm(100), x2 = rnorm(100))
> dat$y1 <- 30 + 5 * rnorm(100) + 3 * dat$x1 + 4 * dat$x2
> dat$y2 <- rnorm(100) + 5 * dat$x2
> m1 <- lm(y1 ~ x1, data = dat)
> m2 <- lm(y1 ~ x2, data = dat)
> m3 <- lm(y1 ~ x1 + x2, data = dat)
> gm1 <- glm(y1 ~ x1, family = Gamma, data = dat)
> outreg(m1, title = "My One Tightly Printed Regression", float = TRUE)
\begin{table}
\caption{My One Tightly Printed Regression}\label{regrlabl}
\begin{tabular}{@{}l*{2}{l}@{}}
\hline
&\multicolumn{1}{l}{M1 }\tabularnewline
&\multicolumn{1}{l}{Estimate}\tabularnewline
&\multicolumn{1}{l}{(S.E.)}\tabularnewline
\hline
\hline
(Intercept) & 30.245*** \tabu
...[truncated]...
epstudy)
+ ex18 <- outreg(fm1)
+ cat(ex18)
+ ## Fit same with lm for comparison
+ lm1 <- lm(Reaction ~ Days, sleepstudy)
+ ## Get robust standard errors
+ lm1rse <- sqrt(diag(car::hccm(lm1)))
+
+ if(interactive()){
+ ex19 <- outreg(list("Random Effects" = fm1,
+ "OLS" = lm1, "OLS Robust SE" = lm1),
+ SElist = list("OLS Robust SE" = lm1rse), type = "html")
+ }
+ ## From the glmer examples
+ gm2 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd),
+ data = cbpp, family = binomial)
+ lm2 <- lm(incidence/size ~ period, data = cbpp)
+ lm2rse <- sqrt(diag(car::hccm(lm2)))
+ ## Lets see what MASS::rlm objects do? Mostly OK
+ rlm2 <- MASS::rlm(incidence/size ~ period, data = cbpp)
+
+ }
Loading required package: lme4
Loading required package: Matrix
Error in get(x, envir = ns, inherits = FALSE) :
object 'formatVC' not found
Calls: outreg ... getVCmat -> lapply -> FUN -> getFromNamespace -> get
Execution halted
Check History
ERROR 0 OK · 6 NOTE · 0 WARNING · 8 ERROR · 0 FAILURE Mar 10, 2026
Rd files
checkRd: (-1) descriptiveTable.Rd:18: Lost braces
18 | other object type that does not fail in code{model.frame(object)}.}
| ^
Rd files
checkRd: (-1) descriptiveTable.Rd:18: Lost braces
18 | other object type that does not fail in code{model.frame(object)}.}
| ^
Rd files
checkRd: (-1) descriptiveTable.Rd:18: Lost braces
18 | other object type that does not fail in code{model.frame(object)}.}
| ^
Rd files
checkRd: (-1) descriptiveTable.Rd:18: Lost braces
18 | other object type that does not fail in code{model.frame(object)}.}
| ^
Rd files
checkRd: (-1) descriptiveTable.Rd:18: Lost braces
18 | other object type that does not fail in code{model.frame(object)}.}
| ^
Rd files
checkRd: (-1) descriptiveTable.Rd:18: Lost braces
18 | other object type that does not fail in code{model.frame(object)}.}
| ^
Rd files
checkRd: (-1) descriptiveTable.Rd:18: Lost braces
18 | other object type that does not fail in code{model.frame(object)}.}
| ^
Rd files
checkRd: (-1) descriptiveTable.Rd:18: Lost braces
18 | other object type that does not fail in code{model.frame(object)}.}
| ^
Rd files
checkRd: (-1) descriptiveTable.Rd:18: Lost braces
18 | other object type that does not fail in code{model.frame(object)}.}
| ^
Rd files
checkRd: (-1) descriptiveTable.Rd:18: Lost braces
18 | other object type that does not fail in code{model.frame(object)}.}
| ^
Rd files
checkRd: (-1) descriptiveTable.Rd:18: Lost braces
18 | other object type that does not fail in code{model.frame(object)}.}
| ^
Rd files
checkRd: (-1) descriptiveTable.Rd:18: Lost braces
18 | other object type that does not fail in code{model.frame(object)}.}
| ^
Rd files
checkRd: (-1) descriptiveTable.Rd:18: Lost braces
18 | other object type that does not fail in code{model.frame(object)}.}
| ^
Rd files
checkRd: (-1) descriptiveTable.Rd:18: Lost braces
18 | other object type that does not fail in code{model.frame(object)}.}
| ^