Repository navigation
var_weights and #3543 - #3692
Conversation
|
@josef-pkt I think this is what you wanted. Let me know if helpful. I'd be thrilled to get this merged. Thanks. |
|
@josef-pkt I realized that I missed your comment in #3410:
So I added a test for that. Sure enough, you were right... I noticed your comment about this taking years to figure out, and there are still blanks out there. I sincerely thank you for your work on this. Its been very, very helpful--I've learned a lot about this models over the past year fiddling with this. As I have this written now in 2 separate PRs, please let me know if you'd rather I close this one and let you deal with these 2 PRs separately or if this combined one is better. Honestly not sure of your opinions on it. Thanks again, @josef-pkt . |
|
If nothing new gets in the way, then I will look at this PR in the next few days. Most likely we can merge this version instead of the two separate ones, the merge and network graph looks good. I think the main open issue that we postpone is MLE versus QMLE and, related, double exponential model for var_weights in models with scale=1. If Gaussian llf still fails here, then there are still bugs in families that define a scale different from 1 (because there scale and var_weights are defined for MLE in loglike.) To return the thanks. It has been a long time since I read the Stata weights documentation for the first time, and didn't understand much of the background. The discussions with you were very helpful, and you did most of the actual implementation. |
|
I thought fixing Gaussian loglike was merged or in the included PR here. But it's not. ftp://public.dhe.ibm.com/software/analytics/spss/documentation/statistics/24.0/en/client/Manuals/IBM_SPSS_Statistics_Algorithms.pdf In Poisson and Binomial, var_weights params and cov_params are correct because the extra, currently incorrect parts don't affect the estimating equations for the mean parameters given fixed scale and var_weights. (That's why we see the problems only in llf and maybe deviance, common additive terms also drop out of the deviance.) (I will try to get an overview of the status of various GLM PRs) |
|
only parts of #2353 are relevant here, other genmod PRs don't directly affect this PR. One change we need is to separate var_weights from the other weights in loglike and related. (A possibly too "tricky" idea is to use the scale argument of loglike also for var_weights) |
|
another issue full loglike versus fast loglike: (Leaving out the terms during optimization or keeping cached versions around looks too complicated right now.) about deviance: |
|
I was looking at Gamma.loglike to see how "wrong" it is, and found the following comment in the code |
|
Hi Josef. Sorry if I've missed something. Had to be away for the past week unexpectedly. It looks like you don't like the current way we are doing loglikelihood and deviance. Is there anything here you want fixed in this PR? I looked at the loglikelihood formulas in the SPSS manual (thanks for finding those) and they look to be different in some cases to the values in the test suite... I presume you want this fixed in another PR. But if my mistaken impression is holding up a merge, let me know. Thanks. |
|
can you rebase and then I will merge as is. I don't have time right now, and I think it's easier to continue with incremental fixes before the next release. I would like to have at least one more round by the end of summer. parameter estimates and wald inference (with limited cov_type) are good, so it is useful as the first main step towards full support of var_weights. |
refactored Gaussian loglike to factor and pull out a 1/2... makes it more succinct.
…py to csv, setupClass -> setup_class, misc smaller changes
Add test for pearson_chi2 Adjust pearson_chi2 for binomial
coerce weights to arrays Test weight formats
7a818f1 to
35c21fb
Compare
|
all green, merging thanks @lorentzenchr @thequackdaddy |
|
Thanks, @josef-pkt ! |
Hello:
This PR contains both #3543 and #3410, with #3543 rebased on master, and then #3410 rebased on top of that.
Let me know if this is what you want.