Simple Regression

2 次查看(过去 30 天)
Ramy Baly
Ramy Baly 2011-2-26
Hello
I am new in Matlab. I have one predictor (X) with a response Y (binomial, 0s and 1s) for x, below a certain threshold => y=0 above the threshold => y=1
I want to make sure that linear regression can 100% predict that. how can I get the regression coefficients to prove that?
Regards Ramy
  1 个评论
John D'Errico
John D'Errico 2011-3-6
I think perhaps you are new to statistics too. A statistical model (i.e., linear regression) will essentially never give you 100% certainty of prediction.

请先登录,再进行评论。

回答(1 个)

Manu R
Manu R 2011-3-6
It sounds to me like you want to consider the logistic functional form for your linear regression, where:
Y(X) = a/(b + exp(c*X)), where a, b, c are fitting parameters.
If your response is binomial as you described, take a look at the multinomial logistic regression function MNRFIT in the MATLAB doc. Don't be confused by the examples on the doc page -- they're meant to illustrate true multinomial models where the response Y can have more than one dimension. This algorithm/function should work just as well for the problem you described.
You just want the basic options, i.e. use only the first two input arguments X and Y, make sure they're fit the dimensional requirements of the inputs and you should be set.
Hope this helps.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by