*example*( pmin ) is useful. I will use it from now on.
Thanks a lot.
On Jan 3, 2008 2:50 AM, Charles C. Berry <[EMAIL PROTECTED]> wrote:
> On Thu, 3 Jan 2008, zhijie zhang wrote:
>
> > Some developments with confusions. I tried the spline method and dummy
> > variable approach to do it. But th
On Thu, 3 Jan 2008, zhijie zhang wrote:
> Some developments with confusions. I tried the spline method and dummy
> variable approach to do it. But their results are very different. See
> following.
>
[volumes of output and gratuitous SAS code deleted]
> Q1: Why are these two methods so differ
Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of zhijie zhang
> Sent: Tuesday, January 01, 2008 8:25 AM
> To: [EMAIL PROTECTED]
> Subject: [R] Specify a correct formula in R for Piecewise
> Linear Functions?
>
> Dear all,
>
Some developments with confusions. I tried the spline method and dummy
variable approach to do it. But their results are very different. See
following.
library(splines)
#Spline methods-Method1
m.glm<-glm(mark~x_trans+poly(elevation_trans,2)+bs(distance_trans,
degree=1,knots=c(13,25))+bs(y_trans,
On Tue, 1 Jan 2008, Charles C. Berry wrote:
> On Tue, 1 Jan 2008, zhijie zhang wrote:
>
>> Dear all,
>> I have two variables, y and x. It seems that the relationship between them
>> is Piecewise Linear Functions. The cutpoint is 20. That is, when x<20, there
>> is a linear relationship between y a
> On Tue, 1 Jan 2008, zhijie zhang wrote:
>
>> Dear all,
>> I have two variables, y and x. It seems that the relationship between
>> them
>> is Piecewise Linear Functions. The cutpoint is 20.
Have a look to the package segmented if you don't know exactly the
breakpoint and you are interested in e
On Tue, 1 Jan 2008, zhijie zhang wrote:
> Dear all,
> I have two variables, y and x. It seems that the relationship between them
> is Piecewise Linear Functions. The cutpoint is 20. That is, when x<20, there
> is a linear relationship between y and x; while x>=20, there is another
> different lin
Dear all,
I have two variables, y and x. It seems that the relationship between them
is Piecewise Linear Functions. The cutpoint is 20. That is, when x<20, there
is a linear relationship between y and x; while x>=20, there is another
different linear relationship between them.
How can i specify t
8 matches
Mail list logo