I am trying to create an histogram of the variable x with frequency but of the variable weights, that has the number of cases of each value of variable x, and not the number of observations in the dataset.
| s | i | x | weights |
| 0 | 1 | 0.1 | 1300 |
| 0 | 2 | 0.1 | 1257 |
| 0 | 3 | 0.2 | 1793 |
| 1 | 4 | 0.5 | 450 |
| 1 | 5 | 0.7 | 2550 |
| 1 | 6 | 0.8 | 23 |
| 1 | 7 | 0.6 | 6549 |
| 1 | 8 | 0.4 | 382 |
| 1 | 9 | 0.1 | 20942 |
Thanks,
Tessa
No comments:
Post a Comment