1
$\begingroup$

I need to know how to do a forecasting for mortality using a logistic regression, can somebody help?

data = {{1., 0.75}, {2., 0.89}, {3., 0.42}, {4., 0.99}, {5., 0.84},
        {6., 0.34}, {7., 0.83}, {8., 0.93}, {9., 0.76}, {10., 0.11}};

nlm = NonlinearModelFit[data, b Exp[m x]/(1 + b Exp[m x]), {b, m}, x]

the data that has been input is fake, i want to know if am doing a forecasting what kind of data should i input?

$\endgroup$
2

1 Answer 1

1
$\begingroup$

So while I can't see your data to make sense, in principle this should work:

data = {{1., 0.75}, {2., 0.89}, {3., 0.42}, {4., 0.99}, {5.,0.84}, 
        {6., 0.34}, {7., 0.83}, {8., 0.93}, {9., 0.76}, {10.,0.11}};

lm = LogitModelFit[ data, x, x ];

lm[11]

0.50088

$\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.