multi_compare_table {sampcompR} | R Documentation |
Create an Output-Table of a multi_compare_object
Description
Returns a table based on the information of a multi_compare_object
which can be outputted as HTML or LaTex Table, for example with the help of
the stargazer function.
Usage
multi_compare_table(
multi_compare_objects,
type = "diff",
names = NULL,
ndigits = 3,
envir = parent.frame()
)
Arguments
multi_compare_objects |
One or more object that were returned by
|
type |
A character string, to determine the type of regression table.
|
names |
A character vector to rename the data frames of comparison. |
ndigits |
The Number of digits that is shown in the table. |
envir |
The environment, where the |
Value
A table containing information on the multivariate comparison based on
the multi_compare
function.
Examples
## Get Data for comparison
require(wooldridge)
card<-wooldridge::card
south <- card[card$south==1,]
north <- card[card$south==0,]
black <- card[card$black==1,]
white <- card[card$black==0,]
## use the function to plot the data
multi_data1 <- sampcompR::multi_compare(df = north,
bench = south,
independent = c("age","fatheduc","motheduc","IQ"),
dependent = c("educ","wage"),
family = "ols")
multi_data2 <- sampcompR::multi_compare(df = black,
bench = white,
independent = c("age","fatheduc","motheduc","IQ"),
dependent = c("educ","wage"),
family = "ols")
table<-multi_compare_table(c("multi_data1","multi_data2"),type="diff")
noquote(table)