BookmarkSubscribeRSS Feed
DR_Majeti
Quartz | Level 8

Please help how to get the BASE variable from AVAL variable ...

My concern is how to retain the base values for even above observation of basline in AVISIT


Screenshot_2013-09-07-11-29-42-343835749.png
1 REPLY 1
Jagadishkatam
Amethyst | Level 16

hi Dr.Majeti,

i tried to explain with a sample data, hope it helps yo

data have;

    infile cards missover;

    input group visit$ aval ablfl $;

cards;

1 SCR   0

1 run   1

1 week0 2    Y

1 week1 1   

1 week2 4   

1 week3 5   

2 SCR   0

2 run   1

2 week0 3    Y

2 week1 1   

2 week2 4   

2 week3 5   

;

run;

proc sort data=    have;

    by group descending ablfl;

run;

data want;

    set have;

    by group descending ablfl;

    retain base;

    if ablfl='Y' then base=aval;

run;

proc sort data=    want;

    by group visit ablfl;

run;

Thanks,

Jagadish

Thanks,
Jag

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!

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
  • 1 reply
  • 641 views
  • 3 likes
  • 2 in conversation