Skip to main content
15 events
when toggle format what by license comment
Jan 18, 2017 at 20:03 comment added Greg Snow @B_Miner, your method is still a variant on the bootstrap, just not the usual sample with replacement version (your ecdf is not the traditional step shaped, but linear between the points). Still a good approach.
Jan 18, 2017 at 3:00 comment added B_Miner I wonder if we are talking about 2 different things. The procress I am using creates elements NOT in the original data. Here is the process: pre_data<-c(7893, 6256, 3240, 3085, 3033, 2973, 2820, 2347, 2341, 2285, 2121, 2093, 1929, 1700, 1640, 1402, 1135, 986, 595, 576, 557, 536, 499, 499, 472, 452,423, 304, 248, 220, 193, 191, 184, 148, 140, 101) pre_data e <- ecdf(pre_data) Y0<-as.integer(quantile(e,runif(30))) Y0
Jan 17, 2017 at 22:41 comment added Greg Snow @B_Miner, sampling from the inverse ecdf is the same as sampling with replacement from the data used to create the ecdf, a bootstrap sample. A reasonable approach (though the bootstrap sample is probably a little simpler).
Jan 17, 2017 at 20:49 comment added B_Miner I also ended up seeing that the simulation of the $Y_{0}$ using rpois was not supplying a good match to the empirical data. So I ended up using an inverse from a cdf. e <- ecdf(past_data$pre_period) Y0<-as.integer(quantile(e,runif(n0+n1)))
Jan 17, 2017 at 17:17 comment added Greg Snow @B_Miner, it is looking good. I would still suggest using log(Y0) so that they are more on the same scale.
Jan 14, 2017 at 15:39 vote accept B_Miner
Jan 13, 2017 at 23:28 comment added B_Miner I added one last version, I should have been simulating Y0 each simulation, versus passing in a fixed vector to use.
Jan 13, 2017 at 21:25 comment added Greg Snow @B_Miner, correct. It is just because the usual link for the Poisson is the log.
Jan 13, 2017 at 17:35 comment added B_Miner Just to confirm - the recommendation for log(Y0) is not to do with power considerations per say, but as probably a better fit for the model to take the log of the covariate?
Jan 13, 2017 at 17:22 comment added B_Miner As always thanks Greg! I am very much looking forward to any articles you write on the topic.
Jan 13, 2017 at 16:18 comment added Greg Snow @B_Miner, yes that is much more along the lines that I was thinking. Though you may want to use log(Y0) for the lin_pred. And it is better to pre-specify the size of hold_power rather than expanding using rbind.
Jan 13, 2017 at 0:22 comment added B_Miner I just added another run ("Add #2") of the approach - does this look better where I am simulating Y1 from exp(lin_pred) which was created from simulating Y0 and using the fixed B0 and B1?
Jan 11, 2017 at 23:58 comment added B_Miner Does that change your recommendation? I am not sure I completely follow simulating both from exp(lin_pred) as it is based off of Y0.
Jan 11, 2017 at 19:03 comment added B_Miner Greg, I added "Add #1" to the question, is this more clear?
Jan 11, 2017 at 16:44 history answered Greg Snow CC BY-SA 3.0