3
$\begingroup$

Recently, I read an article regarding the association between age and lymph node metastases.

The authors stated that:

"Because a nonlinear relationship between age and lymph node involvement was expected based on existing literature, lymph node involvement was also regressed on age using nonparametric logistic regression based on locally weighted scatterplot smoothing (lowess)."

Could someone explain what is nonparametric logistic regression based on locally weighted scatterplot smoothing (lowess)?

$\endgroup$

3 Answers 3

2
$\begingroup$

Using gam is a bit of overkill for what you are doing (but it does work), you could also use the loess function.

To visualize what loess (lowess) is doing you can use the loess.demo function in the TeachingDemos package. It shows the weights used for a specific point and the weighted line fit through those points, then you do the same for another prediction point and see the curve that follows.

$\endgroup$
1
$\begingroup$

I use loess (R lowess function) with outlier detection turned off, when Y is binary. The R Hmisc package makes this easier - see its plsmo function.

$\endgroup$
1
$\begingroup$
   # I found the answer myself.
   # general additive model using gam
    
    library(gam)
    fitgam <- gam(y ~ lo(x), family=binomial)
    plot(fitgam)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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