Nonparametric logistic regression
This function estimates the regression curve using the local likelihood approach for a vector of binomial observations and an associated vector of covariate values.
sm.binomial(x, y, N = rep(1, length(y)), h, ...)
x |
vector of the covariate values |
y |
vector of the response values; they must be
nonnegative integers not larger than those of |
h |
the smoothing parameter; it must be positive. |
N |
a vector containing the binomial denominators. If missing, it is assumed to contain all 1's. |
... |
other optional parameters are passed to the |
see Sections 3.4 and 5.4 of the reference below.
A list containing vectors with the evaluation points, the corresponding probability estimates, the linear predictors, the upper and lower points of the variability bands (on the probability scale) and the standard errors on the linear predictor scale.
graphical output will be produced, depending on the value of the
display
parameter.
Bowman, A.W. and Azzalini, A. (1997). Applied Smoothing Techniques for Data Analysis: the Kernel Approach with S-Plus Illustrations. Oxford University Press, Oxford.
## Not run: # the next example assumes that all binomial denominators are 1's sm.binomial(dose, failure, h=0.5) # in the next example, (some of) the dose levels are replicated sm.binomial(dose, failure, n.trials, h=0.5) ## End(Not run) with(birth, { sm.binomial(Lwt[Smoke=="S"], Low[Smoke=="S"], h=20, xlab='mother weight[Smoke=="S"]') x<- seq(0,1,length=30) y<- rbinom(30,10,prob=2*sin(x)/(1+x)) sm.binomial(x,y,N=rep(10,30), h=0.25) })
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.