BookmarkSubscribeRSS Feed
Ken_oy
Fluorite | Level 6

Trying to create dummy data points for my project. Dots of time 1, 3, 4, 5 are real datapoints, I want to create dummy datapoints for every .5 hour if there is no real datapoint existed (e.g, 0 to 5 by 0.5) .

Question: How to create dummy datapoints as showed in the following curves by using SAS?

http://i52.tinypic.com/2ivdxqu.jpg


IMG064.jpg
3 REPLIES 3
art297
Opal | Level 21

Can you use the approach described in the article at:

http://www.ats.ucla.edu/stat/sas/code/fillin_missing.htm

data_null__
Jade | Level 19

This bit of code can be used to fill in the missing obs for time.

I don't understand how to derive values for H.  At first I thought it was LOCF but your second graph does not seem to be simple LOCF.  Perhaps the link that Art provided is the answer.

data have;

   input time h @;

   cards;

1 1

3 3

4 2

5 1

;;;;

   run;

data time;

   if 0 then set have(keep=time);

   do time = 0 to 5 by .5;

      output;

      end;

   stop;

   run;

proc summary data=have nway classdata=time;

   class time;

   output out=have idgroup(out(h)=);

   run;

proc print;

   run;

Ken_oy
Fluorite | Level 6

Thanks, Art's link works.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 766 views
  • 0 likes
  • 3 in conversation