________________________________________
From: gretl-users-bounces(a)lists.wfu.edu [gretl-users-bounces(a)lists.wfu.edu] on behalf of
Cottrell, Allin [cottrell(a)wfu.edu]
Sent: Thursday, July 14, 2011 11:04 PM
To: Gretl list
Subject: Re: [Gretl-users] smpl in a function
On Thu, Jul 14, 2011 at 8:13 AM, Summers, Peter <psummers(a)highpoint.edu> wrote:
<snip>
>I think we need more context here. Perhaps you're trying to set the sample
>range, inside the function, outside of the limits of the data as given to the
>function?
>E.g., if I do "smpl 1990:1 2010:4" before invoking a function, and then
>in the function we have
>smpl 1989:1 ;
>that's an error -- even if the dataset goes back to, say, 1980:1.
I don't think that's it. The main script sets smpl 1950 2005, then the function
sets the first sample at 1950-1977, then increments the ending date by one each time
through the loop (up to 2005). There's also a backward part that starts from 1977-2005
and decrements the beginning date down to 1950.
OK, but we still need more context -- ideally, a minimal full script
that
illustrates the problem.
Allin et al,
Attached is a copy of the script I've been working on, along with a data set. Once I
got the main program to work, I just copied the relevant parts into the function at the
top. Just uncomment the function call (and comment out the rest) to switch back &
forth.
PS
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users