Bootstrap resample NA handling

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

Amber
Posts: 31
Joined: Wed Aug 03, 2011 4:35 am

Bootstrap resample NA handling

Postby Amber » Fri Sep 07, 2012 3:34 pm

Dear Eviews Experts,

I have a problem occurred when I bootstrap a pool dataset, the pool is unbalanced data, thus when I used "resid.resample", the NAs also got resampled.

I want to keep the original NAs and only resample the non-NA data: "Exclude NAs from draws but copy NA rows to output".

I figured I should add some codes after "resample", will you please kindly tell me what is the code for that?

Thanks a million! :D

Amber

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13317
Joined: Tue Sep 16, 2008 5:38 pm

Re: Bootstrap resample NA handling

Postby EViews Gareth » Fri Sep 07, 2012 8:24 pm

Code: Select all

series.resample(fixna)
Follow us on Twitter @IHSEViews

Amber
Posts: 31
Joined: Wed Aug 03, 2011 4:35 am

Re: Bootstrap resample NA handling

Postby Amber » Mon Sep 24, 2012 10:33 am

Thanks for you reply,

I have a question on block resampling: if block=10, can I use code as "x.resample(fixna,block=10)"?

Thanks again!

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13317
Joined: Tue Sep 16, 2008 5:38 pm

Re: Bootstrap resample NA handling

Postby EViews Gareth » Mon Sep 24, 2012 10:44 am

Yes.
Follow us on Twitter @IHSEViews


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 38 guests