Re: [R] Bootstrap CIs for weighted means of paired differences

2014-11-22 Thread i.petzev
Ok, thanks for the suggestions. I will look into that. And you are absolutely right that I should have been more clear about what type of weighting I want. So to clarify: I run time series regressions of returns of company i on two different sets of explanatory variables. Then I extract the resp

Re: [R] Bootstrap CIs for weighted means of paired differences

2014-11-22 Thread i.petzev
On 21 Nov 2014, at 19:18, David Winsemius wrote: > > On Nov 21, 2014, at 6:52 AM, ivan wrote: > >> I am aware of the fact that bootstrapping produces different CIs with every >> run. I still believe that there is a difference between both types of >> procedures. My understanding is that sett

Re: [R] Bootstrap CIs for weighted means of paired differences

2014-11-21 Thread David Winsemius
On Nov 21, 2014, at 6:52 AM, ivan wrote: > I am aware of the fact that bootstrapping produces different CIs with every > run. I still believe that there is a difference between both types of > procedures. My understanding is that setting "w" in the boot() function > influences the "importance"

Re: [R] Bootstrap CIs for weighted means of paired differences

2014-11-21 Thread ivan
I am aware of the fact that bootstrapping produces different CIs with every run. I still believe that there is a difference between both types of procedures. My understanding is that setting "w" in the boot() function influences the "importance" of observations or how the bootstrap selects the obse

Re: [R] Bootstrap CIs for weighted means of paired differences

2014-11-20 Thread David Winsemius
On Nov 20, 2014, at 2:23 AM, i.petzev wrote: > Hi David, > > sorry, I was not clear. Right. You never were clear about what you wanted and your examples was so statistically symmetric that it is still hard to see what is needed. The examples below show CI's that are arguably equivalent. I can

Re: [R] Bootstrap CIs for weighted means of paired differences

2014-11-20 Thread i.petzev
Hi David, sorry, I was not clear. The difference comes from defining or not defining �w� in the boot() function. The results with your function and your approach are thus: set.seed() x <- rnorm(50) y <- rnorm(50) weights <- runif(50) weights <- weights / sum(weights) dataset <- cbind(x,y,we

Re: [R] Bootstrap CIs for weighted means of paired differences

2014-11-19 Thread David Winsemius
On Nov 19, 2014, at 6:08 AM, i.petzev wrote: > Hi David, > > thanks a lot for the response. I see that this works. I am not sure, however, > what the appropriate way to do this is. It also works if you do not define > weights in the boot() function (weighted bootstrap) but rather in the > vw_

Re: [R] Bootstrap CIs for weighted means of paired differences

2014-11-19 Thread i.petzev
Hi David, thanks a lot for the response. I see that this works. I am not sure, however, what the appropriate way to do this is. It also works if you do not define weights in the boot() function (weighted bootstrap) but rather in the vw_m_diff function (ordinary bootstrap), i.e., vw_m_diff <-

Re: [R] Bootstrap CIs for weighted means of paired differences

2014-11-15 Thread David Winsemius
On Nov 14, 2014, at 3:18 PM, David Winsemius wrote: > > On Nov 14, 2014, at 12:15 PM, ivan wrote: > >> Hi, >> >> I am trying to compute bootstrap confidence intervals for weighted means of >> paired differences with the boot package. Unfortunately, the weighted mean >> estimate lies out of the

Re: [R] Bootstrap CIs for weighted means of paired differences

2014-11-14 Thread David Winsemius
On Nov 14, 2014, at 12:15 PM, ivan wrote: > Hi, > > I am trying to compute bootstrap confidence intervals for weighted means of > paired differences with the boot package. Unfortunately, the weighted mean > estimate lies out of the confidence bounds and hence I am obviously doing > something wro

[R] Bootstrap CIs for weighted means of paired differences

2014-11-14 Thread ivan
Hi, I am trying to compute bootstrap confidence intervals for weighted means of paired differences with the boot package. Unfortunately, the weighted mean estimate lies out of the confidence bounds and hence I am obviously doing something wrong. Appreciate any help. Thanks. Here is a reproducible