Hi,
I am using Stata/IC 16.1 and I would like to calculate the 95%CI for a variable (burden) that is the product of two random variables (using an offset) - count and mean duration with an exposure offset.
This dataset represents a count of injuries, their cumulative duration and the individual's exposure duration within the surveillance period.
To account for the uncertainties, I have been recommended to use a non-parametric bootstrapping approach with 1000 iterations as one approach.
Please see a sample of the dataset below.
* Example generated by -dataex-.
clear
input long id double(injured duration exposure)
18829 6 268 1461
18830 6 673 1461
18832 8 378 1461
20896 1 81 1128
20899 4 94 1461
20902 3 448 761
20906 5 202 1461
20909 6 224 1461
20913 9 556 761
20914 7 372 1461
end
To calculate the burden of the population, the following code has been used previously:
Is there any recommended approach to 1) streamline the approach above, 2) allow <bootstrap> to be ran prior to the collapse?
Many thanks.
I am using Stata/IC 16.1 and I would like to calculate the 95%CI for a variable (burden) that is the product of two random variables (using an offset) - count and mean duration with an exposure offset.
This dataset represents a count of injuries, their cumulative duration and the individual's exposure duration within the surveillance period.
To account for the uncertainties, I have been recommended to use a non-parametric bootstrapping approach with 1000 iterations as one approach.
Please see a sample of the dataset below.
* Example generated by -dataex-.
clear
input long id double(injured duration exposure)
18829 6 268 1461
18830 6 673 1461
18832 8 378 1461
20896 1 81 1128
20899 4 94 1461
20902 3 448 761
20906 5 202 1461
20909 6 224 1461
20913 9 556 761
20914 7 372 1461
end
To calculate the burden of the population, the following code has been used previously:
Code:
*collapse data to summary level collapse (sum) injured duration exposure *create mean duration variable gen duration_mean = duration/injured *create incidence variable gen incidence = injured/exposure*1000 *create burden variable gen burden = incidence*duration_mean
Many thanks.
Comment