[R] Interpretation of loess

About this list Date view Thread view Subject view Author view Attachment view

From: Damon Wischik (djw1005@cam.ac.uk)
Date: Sat 28 Jun 2003 - 02:53:34 EST


Message-id: <Pine.SOL.3.96.1030627173612.11103A-100000@draco.cus.cam.ac.uk>


I have data on a number of patients. Essentially, for each patient I know
his/her age and whether he/she exhibits certain symptoms:

age symptom1 symptom2
 50 0 1
 53 0 0
 70 1 1
  ...

I have started off by fitting simple models with forms like
  Prob(patient of age t shows symptom i) = 1 - Exp(-lambda_i * t)
or
  Prob(patient of age t shows symptom i) = 1 - A_i * Exp(-lambda_i * t)

Now, I want to plot my functional forms against the data, to get a rough
idea of how they look. If I do something simple like

  xyplot(symptom1 ~ age)

I get the data points, but it's hard to see what's going on. So I tried to
generate a smooth curve:

  xyplot(symptom1 ~ age,
    panel=function(x,y,...) {
      panel.xyplot(x,y,...)
      panel.loess(x,y,span=.75,...)
      })

This does generate a smooth curve which looks as if it's roughly in the
right place. But I feel uneasy about using a procedure I don't understand,
and I don't understand enough about loess to know if it's appropriate.

Is loess suitable for dealing with this sort of Bernoulli data? Is there a
different smoothing function which it would be "correct" for me to use?
Does anyone have recommendations about good ways to visualise this sort of
data?

Damon Wischik.

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Tue 01 Jul 2003 - 09:12:09 EST