BookmarkSubscribeRSS Feed
karen8169
Obsidian | Level 7

Well, I have seasonal data and I want to mimic weekly data through moving bootstrapping. But I can't find the most suitable sample and I just piece them together. Is the concept that the mean and var come from AR right? And how to use it in the bootstrapping?

And I want to get the distribution of them.

proc import datafile='C:\Users\user\Desktop\\morgan.csv'
out= morgan dbms=dlm; delimiter=',';
format Date yymm.;
getnames=yes;
run;

   data morgan;
   set a;
   PXlag = lag1(PX );
run;

proc autoreg data=b;
   model PX = PXlag / lagdep=PXlag;
  output out=resid mean standards;
  r=resid;
run;

proc surveyselect data=b out=outboot 
seed=30459584 
method=urs 
samprate=1 
outhits 
rep=1000; 
run;
proc univariate data=outboot;
var x;
by Replicate; 
output out=outall kurtosis=curt;
run;
proc univariate data=outall;
var curt;
output out=final pctlpts=2.5, 97.5 pctlpre=ci;
run;

 

2 REPLIES 2
Ksharp
Super User

If this question was about data simulation, post it at IML forum.

If it was about Time Series Analysis,post it at Forecast forum.

Rick_SAS
SAS Super FREQ

H i @Ksharp

Please do not suggest that people post questions to the SAS/IML forum unless the question is related to IML. If you want to get my attention, just use my @Rick_SAS  name in your response. I will get notified that someone mentioned me in a discussion and I will look at it if I have time. Thanks!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 763 views
  • 0 likes
  • 3 in conversation