Skip to content

WIP: BUG/ENH: Address #2896, pp/qq-plot to compare two data sets with different sizes - #3169

Closed
yl565 wants to merge 1 commit into
statsmodels:masterfrom
yl565:ProbPlot_#2896
Closed

yl565 wants to merge 1 commit into
statsmodels:masterfrom
yl565:ProbPlot_#2896

Conversation

@yl565

@yl565 yl565 commented Aug 18, 2016

Copy link
Copy Markdown
Contributor

This PR is to solve #2896.

For qq-plot, the samples of the larger set are interpolated to match the size of the smaller size.

For pp-plot, the samples of one set is used to estimate an empirical cumulative distribution function which is used to calculate probabilities instead of self.dist

@yl565 yl565 changed the title Address #2896, pp/qq-plot to compare two data sets with different sizes WIP: BUG/ENH: Address #2896, pp/qq-plot to compare two data sets with different sizes Aug 18, 2016
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.01%) to 89.272% when pulling c1677f2 on yl565:ProbPlot_#2896 into 1168655 on statsmodels:master.


if len(s_self) > len(s_other):
raise ValueError("Sample size of `other` must be equal or " +
"larger than this `ProbPlot` instance")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we just swap s_self and s_other in this case?
I don't see an inherent difference between self and other, so we could just switch them. (Which is on the x and which is on the y axis might change dependent on relative size, does it? or is it easy to stick with self being always on the same plot axis/coordinate.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just thinking it's probably good to make it consistent that y-axis always using raw samples from self and x-axis could be interpolated samples if size of other is larger.

@josef-pkt

Copy link
Copy Markdown
Member

@yl565 Thanks

based on a brief look, the approach should work well. 2 quick comments, but I need to postpone a more detailed review until 0.8 is out of the way, which I hope to finish really soon (!).

@josef-pkt josef-pkt modified the milestones: 0.9, 0.10 Apr 22, 2018
@josef-pkt

Copy link
Copy Markdown
Member

postponed to 0.10, I need a closer look at this.

@bashtage

Copy link
Copy Markdown
Member

xref #4840
xref #4832

@bashtage bashtage self-assigned this May 9, 2019
@bashtage

Copy link
Copy Markdown
Member

closed by #5673

@bashtage bashtage closed this May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants