RSGInc / travelSurveyTools

An R package to make working with and summarizing household travel survey data easier.
https://rsginc.github.io/travelSurveyTools/
GNU General Public License v3.0
5 stars 1 forks source link

Checkbox proportions adding up to 1 #108

Closed jacobmoore5067 closed 9 months ago

jacobmoore5067 commented 9 months ago

Suzanne pointed out that proportions for checkbox variables are adding up to 1, so something isn't being calculated right.

Example:

prepped_dt = hts_prep_data(summarize_var = 'prev_res_factors', variables_dt = variable_list, data = hts_data, id_cols = c('hhid', 'person_id', 'day_id', 'tripid', 'vehid'), weighted = FALSE)

cat_summary = hts_summary(prepped_dt = prepped_dt$cat, summarize_var = 'prev_res_factors', summarize_vartype = 'checkbox', id_cols = c('hhid', 'person_id', 'day_id', 'tripid', 'vehid'), weighted = FALSE)

res_summary<-cat_summary$summary$unwtd