multi_compare_merge {sampcompR} | R Documentation |
Combine multi_compare_objects
Description
multi_compare_merge
combines two multi_compare_objects
to plot them together.
Usage
multi_compare_merge(multi_reg_object1, multi_reg_object2, p_adjust = FALSE)
Arguments
multi_reg_object1 , multi_reg_object2 |
Multireg objects that should be combined. |
p_adjust |
A logical input or character string indicating an adjustment
method that isusable in the |
Value
A combined multi_reg_object
that can be used in plot functions to
create a visualization.
Examples
## Get Data for comparison
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"),
family = "ols")
multi_data2 <- sampcompR::multi_compare(df = black,
bench = white,
independent = c("age","fatheduc","motheduc","IQ"),
dependent = c("wage"),
family = "ols")
### merge two objects ###
merged_object<-multi_compare_merge(multi_data1,multi_data2)
### Plot the merged object ###
plot_multi_compare("merged_object")
[Package sampcompR version 0.2.1 Index]