[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Splines
Nick Cox <email@example.com>
Re: st: Splines
Thu, 21 Feb 2013 01:28:23 +0000
You were asked to read the FAQ before posting. That explains that you
are asked not to give minimal name (date) references. Also, BTSCS
looks to me like jargon from your field. It is difficult not to use
jargon on a list like this, but unexplained jargon nevertheless cuts
down the number of people who might both read and reply to your posts.
In terms of your question, running -lowess- and calling the smooth a
spline does not make it a spline. There are many classes of spline,
but I doubt that there's any definition that generous.
The most common kinds of splines are linear and cubic. -mkspline-
creates either kind. My best advice is to read the manual entry on
-mkspline- and run through the examples in the help.
I can't easily follow what you are trying to do otherwise. If you are
saying that your response (dependent variable, in your terms) flips
between states of 0 and states of 1, it sounds quite unsuitable for
splines. But you seem to be trying to model it as a function of
duration, not time; sorry, but you lost on me on that.
My bottom line is that -lowess- is _not_ a spline method.
On Thu, Feb 21, 2013 at 1:08 AM, Marc Peters <firstname.lastname@example.org> wrote:
> I have never used splines before and have a rather silly question. I
> am running a BTSCS model and have read up on my Beck, Katz and Tucker
> (1998) and understood that I should use either temporal dummies or
> splines to adjust for temporal dependence.
> The data is structured as duration data, with events coded as 1 and
> non-events as 0. The dependent variable is measured at discrete
> intervals (years) and an event can go on for several years (it often
> From the data I have created a variable (duration) counting the number
> of years since the last event. The variable is coded as 0 as long as
> the event is ongoing.
> From this variable I create lowess splines using
> lowess Y duration, gen (spline)
> and then:
> logit Y X spline, cluster(id)
> I have understood that this is what you are supposed to do, but since
> the spline is defined on the dependent variable the spline variable
> always take on a high value when duration=0 (i.e. there is an event).
> Consequently, when running the model I receive the following message
> when running the command:
> spline > .4679623 predicts data perfectly
> I would be very grateful if anyone could help me with what it is I am
> doing wrong. In the end, I should probably use cubic splines but first
> I want to understand the simple principle.
* For searches and help try: