Dear Dr Reese,
I believe that you have mathematical problem consists of
the sum of 2 following curves:
#1) nonspecific linear trend = intercept + slope*time ' to be removing
#2) specific response = a*(t-tz) + b*(t-tz)^2 ' parabolic, but can be cosinusoidal
' this is parabolic line which begins after year of tz
y = nonspecific trend + specific response
You can transgenerate independent variable input data - to be avoid machine computation
problems using:
a) manually f.e. 1960-->19.60 OR
b) automatically FOR i=1 TO n: READ year(i), y(i); t(i)=yeart(i)/10: NEXT i
Final weighted regression model:
yregr=( intercept + 10*slope*t)*(1+ERROR(1)) ' when t*10<=tz proportional error model
yregr =yregr + {10*slope*t + 10*b*(t-tz/10) + 100*c*(t-tz/10)^2}*EXP(ERROR(2))
' when t*10>tz sum of proportional error model for trend and exponential error model for
parabolic response (you can select other weighting scheme).
where:
yregr - typical value of regression value for oryginal year value
t - transgenerated independent variable = year/10
tz - lag time in years (tz>=0)
intercept, slope, b, c - fitted 4 parameters for oryginal years
Var(1),Var(2) - fitted variances parameters for residual errors for ERROR(1) and ERROR(2),
having mean=0 and normal distribution of errors.
I hope that it help you.
Sincerely
Kazimierz H. Kozlowski, Pharm.D.
Laboratory of Pharmacokinetics
The Childrens memorial Health Institute
04-736 warsaw, Poland
==========================
"R. Allan Reese" napisał(a):
> I am working on time series and removing obvious trends. Something
> which has me intrigued is that by choosing different times as the origin
> I can fit equivalent but different models, but I do not recall seeing
> this discussed in my training or in the literature.
>
> For example, my data run from 1960 to 2002. A linear trend will have
> the same slope regardless of whether it is regressed on year or
> (year-1900) or (year-1960) but will have different intercepts. As
> these are economic data, it wsa of interest to note that "solving" the
> regression suggested an intercept of zero in the year before the
> programme began, so there was a logic in choosing that as the origin
> year.
>
> Some of the series, however, require a curved fit, and a quadratic was
> used as a first approximation. Fitting year^2 may be equivalent to
> fitting (year-z)^2, but the first caused a numerical failure in the
> algorithm (tolerance exceeded). I had a pragmatic reason for choosing
> a value for z in the centre of the distribution. Different z's give the
> same overall fit (of course) but strongly influence the coefficients on
> lower powers.
>
> It seems to me therefore that the choice of z ought to be a
> consideration in the analysis, maybe using a pragmatic or theory-based
> value. If z is considered another parameter, which criterion should be
> "optimized" given that all models fit equally? How would you define
> the "simplest" model? There may be a connection with fitting orthogonal
> polynomials, so adding the kth order does not change the coefficients
> on k-1 etc, but this seems to me an extra topic.
>
> Comments or references to existing literature, sent to me, would be
> welcomed.
>
> NB. If you have old emails from me "@humus1.ucc..." that address no
> longer works. Use the reply address below.
>
> --------------------------------------------------------------
> R Allan Reese Email: [log in to unmask]
> Graduate School
> University of Hull
> Tel +44 1482 466845 Fax: +44 1482 466436
|