Description Usage Arguments Details Value Examples
Produce latex tables from stripped objects to reduce memory needs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | light_table(
object,
type = c("latex", "html"),
modeltype = "outcome",
title = "Title",
label = "label",
dep.var.labels = "Label dep.var.labels",
dep.var.separate = NULL,
column.labels = "blab",
covariate.labels = NULL,
order_variable = NULL,
stats.var.separate = NULL,
stats.list = c("n", "lln", "bic"),
stats.digits = 3L,
stats.add = NULL,
notes = "notes to add",
add.lines = NULL,
reference_level_position = NULL,
rules_between_covariates = NULL,
omit = NULL,
landscape = FALSE,
adjustbox_width = c(NULL, 1.1),
visualize = FALSE,
footprint = FALSE,
...
)
|
object |
List of object |
type |
Reporting output used. Accepted values are latex and html |
modeltype |
Character vectors indicating whether we should use selection or outcome object. Ignored if object is not zeroinfl |
title |
Table caption |
label |
Table label |
dep.var.labels |
Label for dependent variables |
dep.var.separate |
Numeric vector that specifies how
|
column.labels |
Label for columns |
covariate.labels |
A character vector of labels for
columns in regression tables.
Their layout, in terms of the number of columns
associated with each label, is given by the
argument |
order_variable |
A vector that indicates the order in which variables will appear in the output. |
stats.var.separate |
Numeric vector that specifies how statistics should be laid out across regression table columns. A value of c(2, 1, 3), for instance, will apply the first statistics to the two first columns, the second statistics to the third column, and the statistics will apply to the following three columns (i.e., columns number four, five and six). |
stats.list |
A character vector that specifies which model statistics should
be kept in the regression table output. See |
stats.digits |
Number of digits in relevent statistics |
stats.add |
User-defined additional statistics.
See #69.
For the moment, only possible to provide a string, e.g.
|
notes |
Notes that should be added at the end |
add.lines |
Rows to add in object statistics part |
reference_level_position |
In multinomial logit, coefficients are
relative to the reference level. A column can be added to represent
an empty coefficient modality that is indicated as being the reference.
If |
rules_between_covariates |
A numeric vector that specifies how rules should be laid out across rows of the regression table |
omit |
List of variables that should be removed from the table |
landscape |
Logical value indicating whether we want to
use a landscape table. Default to |
adjustbox_width |
If the table needs to be adjusted to page width, what should be the parameter ? |
visualize |
Logical condition indicating whether we want to print
the table on Rstudio viewer. Ignored if |
footprint |
Should we write the footprint at the head of the table This function is designed to produce |
... |
Additional arguments that should be passed. See, for instance, liststats |
The statistics that are accepted are, for the moment:
"n": Number of observations
"ll": Log likelihood
"lln"Log likelihood by observation
"bic": Bayesian Information Criterion
"link": Distribution used for count and selection models
"alpha": Dispersion parameter for negative binomial models
"sigma": Estimated standard deviation. See sigma
A character vector. The table is printed in the viewer
if type
is html and visualize
is TRUE
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run: data("bioChemists", package = "pscl")
fm_zip <- pscl::zeroinfl(art ~ . | ., data = bioChemists)
fm_zip2 <- pscl::zeroinfl(art ~ 1 | ., data = bioChemists)
glm_model <- glm(art ~ . , data = bioChemists)
fm_zip3 <- pscl::zeroinfl(art ~ 1 | ., data = bioChemists,
dist = "negbin")
fm_zip5 <- MASS::glm.nb(art ~ 1, data = bioChemists)
model_list <- lapply(list(fm_zip, fm_zip2,
glm_model, fm_zip3,
fm_zip5), tablelight::strip)
cat(
tablelight::light_table(object = model_list,
covariate.labels = c("x1","x2")),
sep = "\n"
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.