Hello I want to get 95% bootstrap confidence interval for differences in median between two groups, using 'rank sum' (mann-whitney U test). The code doesn't work and not sure how to recall the stored median values for each group (i.e. median1 and median 2) after running tabstat command. Any help is welcome.
Thank you! BW Kim
Code:
ranksum cost_5year_incQ6_new_adj, by(CA_binary) // Calculate group medians tabstat cost_5year_incQ6_new_adj, by(CA_binary) statistics(median) bootstrap (median1 - median2), reps(1000) seed(12345): /// tabstat cost_5year_incQ6_new_adj, by(CA_binary) statistics(median)
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float(cost_5year_incQ6_new_adj CA_binary) 3924.18 0 162.6696 0 4928.931 0 12978.354 1 984.852 0 7820.9 0 905.237 0 4101.727 0 10151.54 0 3420.6704 0 147.312 1 676.0845 0 96.2562 0 465.0858 0 45124.98 0 354.5962 0 761.8788 0 196.5998 0 5965.98 0 0 0 16783.17 0 113.6655 0 131.7492 0 2626.91 0 2039.158 0 0 0 4187.7344 0 9091.484 0 344.324 0 2027.5046 0 5022.307 0 65420.32 0 135.3106 0 0 0 303.45 0 7685.859 0 12454.23 1 624.994 0 122.8616 0 1212.978 1 499.7064 0 45853.01 0 24.948 0 22.1598 0 660.852 0 0 0 2538.18 0 541.66724 0 14546.33 0 411.312 0 end
Comment