Date: Mon, 22 Sep 2003 10:14:11 -0700
Reply-To: Jack <klazno4@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jack <klazno4@YAHOO.COM>
Organization: http://groups.google.com/
Subject: Re: Min among variables
Content-Type: text/plain; charset=ISO-8859-1
You could use a SAS function named MIN.
Here is how:
your_min_value = MIN(of AGE_BORN1-AGE_BORN17);
This will return the lowest value.
I hope this helps.
Pascale.Beaupre@STATCAN.CA (Pascale Beaupri) wrote in message news:<3182F317E8F3184BBC31053038790C3218828B@stcem01-ebs.ebs.statcan.ca>...
> Hi !
>
> I am trying to find the lowest value by comparing 17 variables...
>
> Context:
> I am currently working on a survey sample of 25 000 respondents. I have
> information relative to the respondents' age at birth of each child. Each
> respondent is an observation (identified by a record id number) and each age
> reported is a variable (age_born1 through age_born17).
>
> RECID AGE TOT_CHILD AGE_BORN1 AGE_BORN2 [...] AGE_BORN17
> 2051 58 3 19 22 99
> 2052 25 1 24 99 99
> 2053 33 2 38 19 99
> [...]
>
> Problem:
> Respondents have reported the age at childbearing in whatever order (eg.
> 2053). The information on each child has been captured as reported in the
> data set. I would like to have them ordered chronologically. That is,
> information (variables) concerning the respondents' first child (oldest),
> second child, and so on... I thought I could create a variable "rank" or
> something similar allowing me to order the children by their arrival.
>
> Any help would be greatly appreciated!!
> Thanks in advance!
>
> Pascale.
|