LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (March 2007, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 19 Mar 2007 09:20:02 -0400
Reply-To:   "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Subject:   Re: How to reduce a dataset
Content-Type:   text/plain; charset=ISO-8859-1

On Sun, 18 Mar 2007 20:52:04 -0700, Andrew Hill <hill.andrewd@GMAIL.COM> wrote:

>Sorry Howard. > >I am not sure why that happend. > >Here is the text again: > > Hi Howard, > >Thanks for your response. > >The reason I don't have a monthly interval is because the trees in the >stands are the analytic unit. I will be using the reduced weather data to >model diameter changes in the trees. > >The variable PRC_50_79_jan is the average precipitation that fell in January >from 1950 to 1979,

That's 30 years, including both endpoints. Yet elsewhere you say that the "measurement intervals" range from 1 to 12 years.

Also, aren't there geographic coordinates for the locations where the measurements were taken?

>not important for solving the coding part of the problem, >but it is the variable name. > >Your suggestion of normalizing is a good one. In fact I have several >different data sets that are based on the measurement interval for the >trees. > >The ideal solution is one the keeps the ID, measurement interval, and first >measurement year, then simply has the variables that I need listed as >Y1_Jan_precip Y2_jan_precip and so on. > >From their I can manipulate them as I need to come up with a solution to my >modeling problem. > > > >On 3/17/07, Andrew Hill <hill.andrewd@gmail.com> wrote: >> >> Dear SAS list, >> >> >> >> I am in the middle of a problem that I could solve via lots of repetitive >> coding, but I think there may be an easier way that one of you may know. >> >> >> >> My problem is this: >> >> >> >> I have a data set with about 3000 variables. (Monthly weather data on a >> 2X2 Km grid for WA, if you are interested). >> >> >> >> Information from this dataset will be integrated with some data from the >> FS about specific stands of trees. The problem that I am facing is that the >> measurement intervals range from 1 year to 12 years in length. Additionally, >> the first measurement year ranges from 1988 to 2001. >> >> >> >> So what I want to end up with is a data set that looks like this: >> >> >> >> ID Init_meas Measurement interval, V1, v2, v3��V36. >> >> >> >> Right now I am looking at writing code that does this with a brute force: >> >> >> >> DATA CLIANL; >> >> SET CLIMIT; >> >> IF INIT_MEAS = '1988' THEN V1 = PRC_50_79_JAN; >> >> IF INIT_MEAS = '1988' THEN V2 = PRC_50_79_FEB; >> >> . >> >> . >> >> . >> >> IF INIT_MEAS = '1993' THEN V1 = PRC_55_84_JAN; >> IF INIT_MEAS = '1993' THEN V1 = PRC_55_84_FEB; >> . >> . >> . >> LOTS MORE OF THE SAME; >> RUN; >> >> >> >> There has to be an easier way to do this. Something that relies on the >> recursion in the process, but I am not sure how to do it. >> >> >> >> Any help is appreciated. >> >> >> >> Thanks, >> >> >> >> Andrew >>


Back to: Top of message | Previous page | Main SAS-L page