Alternative to logistic regression

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
1
down vote

favorite












With this synthetic data set (the relationship between survival/death and the factor x) (plotted in the below figure as blue points), I would like to know how the survival probability depends on the factor x. I don't think logistic regression is the right tool for this data set because I think it can only give a monotonic function as its estimation while for this synthetic data set, I expect a different relationship (the red line in the below figure is my expectation). I wonder what is the best statistical tool here? generalized additive model?



Data points are from an synthetic data set. And the red line is expected to be the reasonable statistical model










share|cite|improve this question







New contributor




Tanis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 1




    If you have information about time to death and not just the binary dead/alive classification, consider using survival analysis instead. Like a logistic regression, a Cox proportional hazards regression can also incorporate splines of continuous predictor variables as noted in the answer by @gung, for example via the rms package in R.
    – EdM
    3 hours ago
















up vote
1
down vote

favorite












With this synthetic data set (the relationship between survival/death and the factor x) (plotted in the below figure as blue points), I would like to know how the survival probability depends on the factor x. I don't think logistic regression is the right tool for this data set because I think it can only give a monotonic function as its estimation while for this synthetic data set, I expect a different relationship (the red line in the below figure is my expectation). I wonder what is the best statistical tool here? generalized additive model?



Data points are from an synthetic data set. And the red line is expected to be the reasonable statistical model










share|cite|improve this question







New contributor




Tanis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 1




    If you have information about time to death and not just the binary dead/alive classification, consider using survival analysis instead. Like a logistic regression, a Cox proportional hazards regression can also incorporate splines of continuous predictor variables as noted in the answer by @gung, for example via the rms package in R.
    – EdM
    3 hours ago












up vote
1
down vote

favorite









up vote
1
down vote

favorite











With this synthetic data set (the relationship between survival/death and the factor x) (plotted in the below figure as blue points), I would like to know how the survival probability depends on the factor x. I don't think logistic regression is the right tool for this data set because I think it can only give a monotonic function as its estimation while for this synthetic data set, I expect a different relationship (the red line in the below figure is my expectation). I wonder what is the best statistical tool here? generalized additive model?



Data points are from an synthetic data set. And the red line is expected to be the reasonable statistical model










share|cite|improve this question







New contributor




Tanis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











With this synthetic data set (the relationship between survival/death and the factor x) (plotted in the below figure as blue points), I would like to know how the survival probability depends on the factor x. I don't think logistic regression is the right tool for this data set because I think it can only give a monotonic function as its estimation while for this synthetic data set, I expect a different relationship (the red line in the below figure is my expectation). I wonder what is the best statistical tool here? generalized additive model?



Data points are from an synthetic data set. And the red line is expected to be the reasonable statistical model







regression logistic






share|cite|improve this question







New contributor




Tanis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|cite|improve this question







New contributor




Tanis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|cite|improve this question




share|cite|improve this question






New contributor




Tanis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 4 hours ago









Tanis

61




61




New contributor




Tanis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Tanis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Tanis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







  • 1




    If you have information about time to death and not just the binary dead/alive classification, consider using survival analysis instead. Like a logistic regression, a Cox proportional hazards regression can also incorporate splines of continuous predictor variables as noted in the answer by @gung, for example via the rms package in R.
    – EdM
    3 hours ago












  • 1




    If you have information about time to death and not just the binary dead/alive classification, consider using survival analysis instead. Like a logistic regression, a Cox proportional hazards regression can also incorporate splines of continuous predictor variables as noted in the answer by @gung, for example via the rms package in R.
    – EdM
    3 hours ago







1




1




If you have information about time to death and not just the binary dead/alive classification, consider using survival analysis instead. Like a logistic regression, a Cox proportional hazards regression can also incorporate splines of continuous predictor variables as noted in the answer by @gung, for example via the rms package in R.
– EdM
3 hours ago




If you have information about time to death and not just the binary dead/alive classification, consider using survival analysis instead. Like a logistic regression, a Cox proportional hazards regression can also incorporate splines of continuous predictor variables as noted in the answer by @gung, for example via the rms package in R.
– EdM
3 hours ago










1 Answer
1






active

oldest

votes

















up vote
3
down vote













Logistic regression can very well model 'curvilinear' relationships, just as linear regression can. You need to add extra terms, functions of x to allow the model to account for that. The most common way is to add a sequence of polynomial terms (i.e., $x^2$, $x^3$, $x^4$, etc.). You can also use other nonlinear transformations of $x$ (e.g., $log(x)$). A more sophisticated approach is to use spline functions.



There is an example of using logistic regression this way in my answer here: How to use boxplots to find the point where values are more likely to come from different conditions?






share|cite|improve this answer




















  • Thanks for your reply. In this sense, is additive model a more convenient tool? I'm not familiar with it but I guess additive model can provide a more convenient way to add nonlinearity to the model?
    – Tanis
    4 hours ago










  • @Tanis, what do you mean by "additive model" here? A simple model w/ x, x2, & x3, could well be called an additive model.
    – gung♦
    4 hours ago






  • 1




    I have this link to its wikipedia page. en.wikipedia.org/wiki/Generalized_additive_model
    – Tanis
    4 hours ago










  • @Tanis, OK, a GAM isn't quite the same as the generic use of "additive model". At any rate, you can think of a logistic regression with polynomial terms as a simple case of a GAM. Whether it's "more convenient" would only be a function of your relative comfort w/ the code.
    – gung♦
    4 hours ago










Your Answer




StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "65"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);






Tanis is a new contributor. Be nice, and check out our Code of Conduct.









 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstats.stackexchange.com%2fquestions%2f369026%2falternative-to-logistic-regression%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
3
down vote













Logistic regression can very well model 'curvilinear' relationships, just as linear regression can. You need to add extra terms, functions of x to allow the model to account for that. The most common way is to add a sequence of polynomial terms (i.e., $x^2$, $x^3$, $x^4$, etc.). You can also use other nonlinear transformations of $x$ (e.g., $log(x)$). A more sophisticated approach is to use spline functions.



There is an example of using logistic regression this way in my answer here: How to use boxplots to find the point where values are more likely to come from different conditions?






share|cite|improve this answer




















  • Thanks for your reply. In this sense, is additive model a more convenient tool? I'm not familiar with it but I guess additive model can provide a more convenient way to add nonlinearity to the model?
    – Tanis
    4 hours ago










  • @Tanis, what do you mean by "additive model" here? A simple model w/ x, x2, & x3, could well be called an additive model.
    – gung♦
    4 hours ago






  • 1




    I have this link to its wikipedia page. en.wikipedia.org/wiki/Generalized_additive_model
    – Tanis
    4 hours ago










  • @Tanis, OK, a GAM isn't quite the same as the generic use of "additive model". At any rate, you can think of a logistic regression with polynomial terms as a simple case of a GAM. Whether it's "more convenient" would only be a function of your relative comfort w/ the code.
    – gung♦
    4 hours ago














up vote
3
down vote













Logistic regression can very well model 'curvilinear' relationships, just as linear regression can. You need to add extra terms, functions of x to allow the model to account for that. The most common way is to add a sequence of polynomial terms (i.e., $x^2$, $x^3$, $x^4$, etc.). You can also use other nonlinear transformations of $x$ (e.g., $log(x)$). A more sophisticated approach is to use spline functions.



There is an example of using logistic regression this way in my answer here: How to use boxplots to find the point where values are more likely to come from different conditions?






share|cite|improve this answer




















  • Thanks for your reply. In this sense, is additive model a more convenient tool? I'm not familiar with it but I guess additive model can provide a more convenient way to add nonlinearity to the model?
    – Tanis
    4 hours ago










  • @Tanis, what do you mean by "additive model" here? A simple model w/ x, x2, & x3, could well be called an additive model.
    – gung♦
    4 hours ago






  • 1




    I have this link to its wikipedia page. en.wikipedia.org/wiki/Generalized_additive_model
    – Tanis
    4 hours ago










  • @Tanis, OK, a GAM isn't quite the same as the generic use of "additive model". At any rate, you can think of a logistic regression with polynomial terms as a simple case of a GAM. Whether it's "more convenient" would only be a function of your relative comfort w/ the code.
    – gung♦
    4 hours ago












up vote
3
down vote










up vote
3
down vote









Logistic regression can very well model 'curvilinear' relationships, just as linear regression can. You need to add extra terms, functions of x to allow the model to account for that. The most common way is to add a sequence of polynomial terms (i.e., $x^2$, $x^3$, $x^4$, etc.). You can also use other nonlinear transformations of $x$ (e.g., $log(x)$). A more sophisticated approach is to use spline functions.



There is an example of using logistic regression this way in my answer here: How to use boxplots to find the point where values are more likely to come from different conditions?






share|cite|improve this answer












Logistic regression can very well model 'curvilinear' relationships, just as linear regression can. You need to add extra terms, functions of x to allow the model to account for that. The most common way is to add a sequence of polynomial terms (i.e., $x^2$, $x^3$, $x^4$, etc.). You can also use other nonlinear transformations of $x$ (e.g., $log(x)$). A more sophisticated approach is to use spline functions.



There is an example of using logistic regression this way in my answer here: How to use boxplots to find the point where values are more likely to come from different conditions?







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered 4 hours ago









gung♦

103k34246510




103k34246510











  • Thanks for your reply. In this sense, is additive model a more convenient tool? I'm not familiar with it but I guess additive model can provide a more convenient way to add nonlinearity to the model?
    – Tanis
    4 hours ago










  • @Tanis, what do you mean by "additive model" here? A simple model w/ x, x2, & x3, could well be called an additive model.
    – gung♦
    4 hours ago






  • 1




    I have this link to its wikipedia page. en.wikipedia.org/wiki/Generalized_additive_model
    – Tanis
    4 hours ago










  • @Tanis, OK, a GAM isn't quite the same as the generic use of "additive model". At any rate, you can think of a logistic regression with polynomial terms as a simple case of a GAM. Whether it's "more convenient" would only be a function of your relative comfort w/ the code.
    – gung♦
    4 hours ago
















  • Thanks for your reply. In this sense, is additive model a more convenient tool? I'm not familiar with it but I guess additive model can provide a more convenient way to add nonlinearity to the model?
    – Tanis
    4 hours ago










  • @Tanis, what do you mean by "additive model" here? A simple model w/ x, x2, & x3, could well be called an additive model.
    – gung♦
    4 hours ago






  • 1




    I have this link to its wikipedia page. en.wikipedia.org/wiki/Generalized_additive_model
    – Tanis
    4 hours ago










  • @Tanis, OK, a GAM isn't quite the same as the generic use of "additive model". At any rate, you can think of a logistic regression with polynomial terms as a simple case of a GAM. Whether it's "more convenient" would only be a function of your relative comfort w/ the code.
    – gung♦
    4 hours ago















Thanks for your reply. In this sense, is additive model a more convenient tool? I'm not familiar with it but I guess additive model can provide a more convenient way to add nonlinearity to the model?
– Tanis
4 hours ago




Thanks for your reply. In this sense, is additive model a more convenient tool? I'm not familiar with it but I guess additive model can provide a more convenient way to add nonlinearity to the model?
– Tanis
4 hours ago












@Tanis, what do you mean by "additive model" here? A simple model w/ x, x2, & x3, could well be called an additive model.
– gung♦
4 hours ago




@Tanis, what do you mean by "additive model" here? A simple model w/ x, x2, & x3, could well be called an additive model.
– gung♦
4 hours ago




1




1




I have this link to its wikipedia page. en.wikipedia.org/wiki/Generalized_additive_model
– Tanis
4 hours ago




I have this link to its wikipedia page. en.wikipedia.org/wiki/Generalized_additive_model
– Tanis
4 hours ago












@Tanis, OK, a GAM isn't quite the same as the generic use of "additive model". At any rate, you can think of a logistic regression with polynomial terms as a simple case of a GAM. Whether it's "more convenient" would only be a function of your relative comfort w/ the code.
– gung♦
4 hours ago




@Tanis, OK, a GAM isn't quite the same as the generic use of "additive model". At any rate, you can think of a logistic regression with polynomial terms as a simple case of a GAM. Whether it's "more convenient" would only be a function of your relative comfort w/ the code.
– gung♦
4 hours ago










Tanis is a new contributor. Be nice, and check out our Code of Conduct.









 

draft saved


draft discarded


















Tanis is a new contributor. Be nice, and check out our Code of Conduct.












Tanis is a new contributor. Be nice, and check out our Code of Conduct.











Tanis is a new contributor. Be nice, and check out our Code of Conduct.













 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstats.stackexchange.com%2fquestions%2f369026%2falternative-to-logistic-regression%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

Long meetings (6-7 hours a day): Being “babysat” by supervisor

What does second last employer means? [closed]

One-line joke