|
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
>>
|