Take the 2-minute tour ×
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

(Please note the cross-post at http://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...

share|improve this question

closed as off topic by chl Nov 11 '11 at 12:16

Questions on Cross Validated are expected to relate to statistics within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
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. –  chl Nov 9 '11 at 22:23
add comment

1 Answer 1

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.

share|improve this answer
add comment

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