Skip to content
Back to formatted view

Raw Message

Message-ID: <49CA8F51.2080800@gmail.com>
Date: 2009-03-25T20:08:49Z
From: Joe Waddell
Subject: Piecewise

Hi,
I am a biologist (relatively new to R) analyzing data which we predict 
to fit a power function.  I was wondering if anyone knew a way to model 
piecewise functions in R, where across a range of values (0-x) the data 
is modeled as a power function, and across another range (x-inf) it is a 
linear function.  This would be predicted by one of our hypotheses, and 
we would like to find the AICs and weights for a piecewise function as 
described, compared with a power function across the entire range.

I have looked into the polySpline function, however it appears to use 
only polynomials, instead of the nls models I have been using.  Thanks 
in advance for any help you might be able to offer.

Cheers,
-Joe Waddell