Date: Mon, 21 Jul 2008 19:02:57 -0300
Reply-To: Adriano Rodrigues <adriano@GPP.COM.BR>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Adriano Rodrigues <adriano@GPP.COM.BR>
Subject: Re: Passing a number calculated from another dataset into a new
dataset
In-Reply-To: <798d4770-86cc-40a2-8048-da0620ef3d1a@m36g2000hse.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
Post some sample the data you have and what you want, looks is not
dificult to do what you want.
Em 21/07/2008, ās 18:56, wardnine@HOTMAIL.COM escreveu:
> I have a question about something which is probably simple but I just
> don't know how to do. I have a pre-existing, one record dataset A
> where I've calculated 10 numbers that are stored as variables within
> the data set (for example, the data set may have already had
> expenditure and enrollment numeric data in it, and I calculated a new
> per-pupil expenditure (PPE) variable by dividing expenditure by
> enrollment).
>
> I want to use those 10 numbers as constants in an unrelated dataset B
> that I am creating via data step but am unsure how to pass those 10
> numbers from dataset A in. I am trying to create variables in dataset
> B by multiplying variables that exist in the dataset (via a previous
> dataset that I've set into this data step) by the numbers calculated
> from dataset A. For example, if dataset B has a variable called
> income, you can create a variable called new_income by multipliying
> income by a constant (new_income = income * 5), but instead of using
> the number "5" in this example, I want to use one of the 10 numbers I
> calculated in dataset A.
>
> I've maybe made this sound confusing/harder than it actually is but if
> anyone understands this post please let me know how this is done,
> thanks!
>
>
> Julie
|