Skip to content
Prev 13960 / 398502 Next

plot of Bernoulli data

The loess smoother, with outlier detection turned off,
is an excellent way to estimate the relationship
between a continuous variable and the probability
of an event, based on a binary dependent variable.
Use lowess(x,y,iter=0).  I do wonder about the way in
which your data are generated, however.  You
might think about

 p <- whatever  # and check that if you use pnorm the
                # first arg to pnorm spans the right metric
 y <- 1*(runif(n) <= p)  # n=100 in your example
Bill Simpson wrote: