This answer is based on texreg
version 1.37.5.
Observe that the objects are of class lm_robust
:
> class(mod1)
## [1] "lm_robust"
You can display the help page for the corresponding extract
method as follows:
?extract.lm_robust
## [..]
##
## extract.lm_robust(
## model,
## include.ci = TRUE,
## include.rsquared = TRUE,
## include.adjrs = TRUE,
## include.nobs = TRUE,
## include.fstatistic = FALSE,
## include.rmse = TRUE,
## include.nclusts = TRUE,
## ...
## )
##
## [...]
In your example, you can get rid of all GOF rows as follows:
screenreg(list(mod1, mod2),
include.rsquared = FALSE,
include.adjrs = FALSE,
include.nobs = FALSE,
include.rmse = FALSE)
## =========================================
## Model 1 Model 2
## -----------------------------------------
## (Intercept) -0.01 -0.00
## [-0.10; 0.08] [-0.07; 0.06]
## x1 0.49 * 0.48 *
## [ 0.40; 0.58] [ 0.41; 0.54]
## x2 0.98 *
## [ 0.92; 1.05]
## =========================================
## * Null hypothesis value outside the confidence interval.
Change from screenreg
to texreg
to get LaTeX output. Leave out the last two arguments to get rid of only R-squared and adjusted R-squared. The F-statistic is not reported by default. (Perhaps you used an old version of texreg
?)
To remove statistics without using those arguments, you can also save texreg
objects into intermediate objects and manipulate them before you hand them over to the respective table layout function, like in the following example:
tr1 <- extract(mod1)
tr1@gof.names <- tr1@gof.names[-(1:2)]
tr1@gof.decimal <- tr1@gof.decimal[-(1:2)]
tr1@gof <- tr1@gof[-(1:2)]
screenreg(list(tr1, mod2))
## =========================================
## Model 1 Model 2
## -----------------------------------------
## (Intercept) -0.01 -0.00
## [-0.10; 0.08] [-0.07; 0.06]
## x1 0.49 * 0.48 *
## [ 0.40; 0.58] [ 0.41; 0.54]
## x2 0.98 *
## [ 0.92; 1.05]
## -----------------------------------------
## Num. obs. 1000 1000
## RMSE 1.41 1.03
## R^2 0.53
## Adj. R^2 0.53
## =========================================
## * Null hypothesis value outside the confidence interval.
This requires a bit more effort but gives you full control and is applicable also if you want to change only some of the models.