Skip to content
Prev 20106 / 398500 Next

fitting non linear data

To factor in model uncertainty you might bootstrap a semiparametric regression.   The Hmisc library areg.boot function, using the default method of avas, develops a semiparametric additive model and uses the bootstrap for confidence bands for the transformations on predictor and response variables.  As an example I tried

f <- areg.boot(I(y) ~ x)   # don't transform y, optimally transform x
# The default y ~ x shows a lot of uncertainty in transformation of y for
# large y

f

avas Additive Regression Model

areg.boot(x = I(y) ~ x)

n= 8   p= 1 

Apparent R2 on transformed Y scale: 0.886
Bootstrap validated R2            : 0.683

Coefficients of standardized transformations:

    Intercept             x 
-1.503799e-16  1.087857e+00 

summary(f)

summary.areg.boot(obj = f)

Estimates based on 100 resamples

Values to which predictors are set when estimating
effects of other predictors:

I(y)    x 
 5.5  5.5 

Estimates of differences of effects on Median Y (from first X value),
and bootstrap standard errors of these differences.
Settings for X are shown as row headings.


Predictor: x 
      
x      Differences      S.E Lower 0.95 Upper 0.95         Z      Pr(|Z|)
  3.75    0.000000       NA         NA         NA        NA           NA
  5.50   -4.614057 1.268541  -7.100353  -2.127762 -3.637294 0.0002755177
  7.25   -7.144868 2.030195 -11.123978  -3.165758 -3.519300 0.0004326864

plot(f)  # see attached

I had to fix a small bug in the function to make this work.
In the plot, confidence bands are in black, individual bootstrap estimates are in red.

Frank Harrell


On Wed, 22 May 2002 12:21:45 +0200
gregory lefebvre <greggory.lefebvre at univ-rouen.fr> wrote: