Date: Fri, 10 Feb 2006 08:58:55 -0800
Reply-To: "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject: Re: adding observations when class variables are missing,
but are not missing data
Content-Type: text/plain; charset="us-ascii"
Gilacypha -
Look up the proc means completetypes option and read Andy Karp's most
excellent: Advanced Tips and Techniques with PROC MEANS
http://www2.sas.com/proceedings/sugi27/p018-27.pdf
hth
Paul Choate
DDS Data Extraction
(916) 654-2160
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
gilacypha
Sent: Friday, February 10, 2006 8:48 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: adding observations when class variables are missing, but are
not missing data
below is a subset of a dataset i am currently working with.
Sub Catch
Obs Seg Season SetDate Bend Sample Species TNEFF Ttl
14 8 ST 18APR2005 39 1 999 0.98 0
15 8 ST 18APR2005 39 2 062 0.82 1
16 8 ST 18APR2005 39 3 999 1.31 0
17 8 ST 18APR2005 39 4 028 1.17 1
18 8 ST 18APR2005 39 5 062 1.51 1
19 8 ST 18APR2005 39 6 999 0.84 0
20 8 ST 18APR2005 39 7 999 1.30 0
i am trying to obtain the mean total catch of each species within a
bend. the problem that i am having is trying to get species which were
not caputerd in subsamples within a bend (not missing data within a
bend).
therefore, my question is ....how do i insert/create speceis
observations that are not in one subsample, but do exist in subsequent
subsamples within same bend.
example of what i want the above to look like for bend:
Sub Catch
Obs Seg Season SetDate Bend Sample Species TNEFF Ttl
14 8 ST 18APR2005 39 1 028 0.98 0
15 8 ST 18APR2005 39 1 062 0.98 0
16 8 ST 18APR2005 39 2 028 0.82 1
17 8 ST 18APR2005 39 2 062 0.82 0
18 8 ST 18APR2005 39 3 028 1.31 0
19 8 ST 18APR2005 39 3 062 1.31 0
20 8 ST 18APR2005 39 4 028 1.17 1
21 8 ST 18APR2005 39 4 062 1.17 0
22 8 ST 18APR2005 39 5 028 1.51 0
23 8 ST 18APR2005 39 5 062 1.51 1
24 8 ST 18APR2005 39 6 028 0.84 0
25 8 ST 18APR2005 39 6 062 0.84 0
26 8 ST 18APR2005 39 7 028 1.30 0
27 8 ST 18APR2005 39 7 062 1.30 0
i am a novice sas user so any information explaining the fucntion of
the code would be greatly appreciated.
thanks in advance