5
$\begingroup$

(Please note the cross-post at https://stackoverflow.com/questions/7626347/difference-between-lp-or-simply-in-rs-locfit)

I am not sure I see the difference between different examples for local logistic regression in the documentation of the gold standard locfit package for R: http://cran.r-project.org/web/packages/locfit/locfit.pdf

I get starkingly different results with

fit2<-scb(closed_rule ~ lp(bl),deg=1,xlim=c(0,1),ev=lfgrid(100), family='binomial',alpha=cbind(0,0.3),kern="parm")

from

fit2<-scb(closed_rule ~ bl,deg=1,xlim=c(0,1),ev=lfgrid(100), family='binomial',alpha=cbind(0,0.3),kern="parm")

.

What is the nature of the difference? Maybe that can help me phrase which I wanted. I had in mind an index linear in bl within a logistic link function predicting the probability of closed_rule. The documentation of lp says that it fits a local polynomial -- which is great, but I thought that would happen even if I leave it out. And in any case, the documentation has examples for "local logistic regression" either way...

$\endgroup$
1
  • $\begingroup$ Please, don't cross-post. Choose one site once and for all. I will delete this one by the end of the week without action from your part. $\endgroup$
    – chl
    Nov 9, 2011 at 22:23

1 Answer 1

2
$\begingroup$

The author of the locfit package, Catherine Loader, kindly answered my email. She says that instead of the alpha argument of scb, separate h and nn arguments need to go inside lp if I specify it within the formula for scb.

I could not get the code work that way though. And I am still unsure about why there should a difference from the case without specifying lp() and simply giving the alpha and deg arguments to the scb function.

And she also noted an important error my code as posted: with the 'parm' kernel, there is no local smoothing, but a parametric (in my case, logic) estimate.

Finally, note that the literature seems to suggest specifying type=4 as an argument for scb for logistic regressions.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.