0
$\begingroup$

I have simple model $Y~X$ where $Y \sim Bin(1, p)$, so it's a case of simple logistic regression. $X$ is continuous. How to know what function to use to transform $X$ to get the best model fit?

$\endgroup$
3
$\begingroup$

There are many ways to go about this. If you had only a single $X$ you could just use the loess nonparametric smoother with outlier detection turned off to estimate the probability that $Y=1$ given $X=x$ (e.g., see the R Hmisc package plsmo function). In general, regression splines are great solutions because they are flexible and because they are honest about how many parameters (degrees of freedom) there are in the fit, which results in accurate confidence bands and $P$-values. Much more detail is in my handouts available through http://biostat.mc.vanderbilt.edu/rms.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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