Repository navigation
ENH: multivariate mean tests and confint - #4107
Conversation
|
I guess there is no |
|
a comment about the that is, we have (e.g. for confidence intervals): my guess is that Stata does (ii) while I do (i) following Johnson and Wichern, but I might have it still wrong. (I didn't try to understand the math for the different cases. The second point is that we also vectorize individual tests as in t_test, which are not joint tests but for simultaneous confint we want to correct for multiple testing.) edit |
|
@josef-pkt I'll be happy to look this over if review will be useful. Kinda at a loss for how to contribute these days. |
|
@jbrockmendel It's a bit early to review this. We need functionality like this and similar. But the occasion was writing code that is relatively limited and can be done in a few hours when I have time. I was only reading and opening issues in the last round in this area, at least I don't find any code. |
82720ce to
b3ecbf9
Compare
|
amended with division from the future |
|
will need rebase when working on this again |
| mean or their linear transformation, center of the confidence region | ||
|
|
||
|
|
||
| Result 5.3 page 225 |
There was a problem hiding this comment.
What is the reference here?
no reference to a book or article in code/docstrings
There was a problem hiding this comment.
Johnson and Wichern 6th edition, mentioned in the PR description
|
These look like nice simple functions that we should be able to merge independent of more elaborate enhancements (I don't remember right now what I had in mind. One related application area that I looked at, are control charts). |
|
It looks like simultaneous confint could be used for prediction in models based on params and cov_params, |
b3ecbf9 to
27d1f86
Compare
|
Hello @josef-pkt! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-05-07 14:20:36 UTC |
|
rebased |
|
no failures besides lint |
|
this PR only includes 1-sample test and confidence interval Stata mvtest means includes k-sample test of equal means under homoscedasticity and heteroscedasticity. (technical details looks good) In Stata 2-sample and k-sample mv tests use the same interface (function call) but algorithm differs under heteroscedasticity. |
|
possible merge the two confint function and add keyword test_mvmean_1samp and to add maybe (Stata doesn't have it as special case) Stata has several null hypothesis in one sample case: equal test that variables in varlist have equal means; the default aside: R package https://cran.r-project.org/web/packages/ICSNP/index.html (and then we get into copulas, ....) |
27d1f86 to
3c05be7
Compare
|
I amended commit (only one so far) with pep-8 cleaning and removing |
9f818bf to
40df01f
Compare
|
merge when green, extensions mv mean testing left for another time |
|
lint check fails in statespace in master, not this PR mergin |
see e.g. #3208
I thought I already wrote something like this but don't find anything.
This is currently just a short exercise writing some basic multivariate mean tests to get started.
plans for implementation
There is a lot of repeated computation if we provide and use separate function that all start from data. Those standalone functions are good to get started but need better structure.
Most likely the pattern will or should follow weightstats with a mixture of classes and standalone functions. One useful pattern is to have the functions based on summary statistics, so we have to compute those only once.
Reference for this time is Johnson and Wichern Applied Multivariate Statistical Analysis 6th edition. (I started to browse it by chance.)
Stata mvtests has good functions with almost complete formulas. However, I didn't see anything about mv confidence intervals. The simulataneous confidence intervals here use an example from Johnson and Wickern. They look similar to or the same as the Sheffe intervals added by Kerby.
Pointwise confidence intervals are compared to weightstats.
Stata doesn't have any kurtosis correction in mvtests, AFAICS. (see elliptical issues)