Date: Fri, 8 May 2009 07:53:35 -0500
Reply-To: "Data _null_;" <iebupdte@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Data _null_;" <iebupdte@GMAIL.COM>
Subject: Re: Need help in inserting obs
In-Reply-To: <6c77763c-2cdb-4190-9ef3-a5baa89f5693@b1g2000vbc.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
data a;
input id visit amt tx :$2.;
cards;
1 1 100 qd
1 2 100 qd
1 4 100 qd
2 1 100 qd
2 2 100 qd
2 4 100 qd
;;;;
run;
data class;
if 0 then set a(keep=visit);
do visit=1 to 4;
output;
end;
stop;
run;
proc summary nway missing data=a classdata=class;
by id;
class visit;
output out=work.full(drop=_:) idgroup(out(amt tx)=);
run;
proc print;
run;
On 5/8/09, Raju <hadsomeraja@gmail.com> wrote:
> Hi All,
>
> I have 300 subjects and I would like to insert an extra obs using
> visit. for example
>
> id visit amt tx
> 1 1 100 qd
> 1 2 100 qd
> 1 4 100 qd
> 2 1 100 qd
> 2 2 100 qd
> 2 4 100 qd
>
> The above ds has 6 obs and I would like to include two more with visit
> 3. Is there any way to insert obs like this? Please torch some light
> on me..
>
> Thanks
> Raju
>
|