You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A small bug in GenericLikelihoodModelResults.bootstrap() #1434
I guess line 1917 of statsmodels / base / model.py rvsind = np.random.randint(self.nobs - 1, size=self.nobs)
should be rvsind = np.random.randint(self.nobs, size=self.nobs).
Otherwise the last observation would never be sampled.
statsmodels is a very usefully package, filling the gap between python and statistics beyond high school. (rpy2 and R might be a bit too esoteric to average user like me...) I hope it will become more full-fledged.
I used GenericLikelihoodModel to fit psychometric function (essentially a modified logistic regression with lower and upper asymptotes other than 0 and 1), and implemented parametric and non-parametric bootstrap methods accordingly. But I found it not easy for me to make the code more generic in order to be useful to others.
@herrlich10 No, don't close this issue, I still need to fix this.
About your application: If you are willing to publish it, it would still make a good example, either to be converted to a notebook documentation example, https://github.com/statsmodels/statsmodels/wiki/Examples , or as an example that can eventually be converted to a supported model class.
To the latter: I think it would be useful to get a collection of common non-linear models, and logistic regression, without the 0, 1 probability assumption as in discrete Logit, would be a good candidate. IIRC there are at least a few stackoverflow examples for this.
Activity
josef-pkt commentedon Feb 27, 2014
Thanks for catching this. clearly a bug
( the bootstrap is experimental, because we need to add a more general method for it, that allows a choice of bootstrap type.)
herrlich10 commentedon Mar 5, 2014
statsmodelsis a very usefully package, filling the gap between python and statistics beyond high school. (rpy2 and R might be a bit too esoteric to average user like me...) I hope it will become more full-fledged.I used
GenericLikelihoodModelto fit psychometric function (essentially a modified logistic regression with lower and upper asymptotes other than 0 and 1), and implemented parametric and non-parametric bootstrap methods accordingly. But I found it not easy for me to make the code more generic in order to be useful to others.herrlich10 commentedon Mar 5, 2014
BTW, shall I close this issue for now?
josef-pkt commentedon Mar 6, 2014
@herrlich10 No, don't close this issue, I still need to fix this.
About your application: If you are willing to publish it, it would still make a good example, either to be converted to a notebook documentation example, https://github.com/statsmodels/statsmodels/wiki/Examples , or as an example that can eventually be converted to a supported model class.
To the latter: I think it would be useful to get a collection of common non-linear models, and logistic regression, without the 0, 1 probability assumption as in discrete Logit, would be a good candidate. IIRC there are at least a few stackoverflow examples for this.
BUG GenericLikelihood ResultMixin add last obs to rvs, closes statsmo…