biv_compare_table {sampcompR} | R Documentation |
Returns a table based on the information of a biv_compare_object
which
can be outputted as html or LaTex Table, for example with the help of the
stargazer function.
Description
Returns a table based on the information of a biv_compare_object
which
can be outputted as html or LaTex Table, for example with the help of the
stargazer function.
Usage
biv_compare_table(
biv_compare_object,
type = "diff",
comparison_number = 1,
ndigits = 2
)
Arguments
biv_compare_object |
A object returned by the
|
type |
A character string, to choose what matrix should be printed.
|
comparison_number |
A number indicating the data of which data frame,
benchmark or comparison should be displayed.
The maximum length is equal to the length of the |
ndigits |
Number of digits shown in the table. |
Value
A correlation matrix, or difference matrix based on information of a biv_compare_object
.
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
bivar_data<-sampcompR::biv_compare(dfs = c("north","white"),
benchmarks = c("south","black"),
variables= c("age","educ","fatheduc","motheduc","wage","IQ"),
data=TRUE)
table<-sampcompR::biv_compare_table(bivar_data, type="diff", comparison_number=1)
noquote(table)