Replies: 10 comments 21 replies
-
They are usually accompanied by
If you're going for a |
Beta Was this translation helpful? Give feedback.
-
I don't have the background to address some of the task list, but i may be interested to contribute in the near future. I'm also curious how you envision the package developing from here:
|
Beta Was this translation helpful? Give feedback.
-
First, I want to say a great big THANKS to the ggplot-extention-club. I'm glad I found you! But, I'm mainly a ggplot user, rather than a developer, so I hope I can learn from you here. @corybrunson Thanks for these comments. On (1), yes -- there is another domain in which there is an ideal physical domain -- that for categorical data and loglinear models, where the physical analog of observations in cells of a frequency table is that of gas molecules that exert pressure, and fitting a LLM is just the balancing of forces. This is described in my American Statistician paper You'll see in the paper graphical realizations of this idea for two way tables, and a pseudo-animation of the process of iterative proportional fitting. Hey, I did this all in SAS! I'll throw this back to the group: If you accept that springs are a visual realization of the forces of least squares, what kind of stats/geoms would represent the pressure forces of observations in cells of a frequency table? Clearly, it's just random points, whose number is proportional to the observed frequency in the cells, but the key thing is to make the sizes of the tiles proportional to those under an independence model |
Beta Was this translation helpful? Give feedback.
-
Thanks @teunbrand for tips on documenting a
But R cmd check complains,
and
|
Beta Was this translation helpful? Give feedback.
-
I've invited @teunbrand and @corybrunson to the repo, in case you want to access / mess with the code. Any help is very welcomed! |
Beta Was this translation helpful? Give feedback.
-
@corybrunson It is already possible to illustrate the something of the gas pressure analog using
|
Beta Was this translation helpful? Give feedback.
-
Hi @EvaMaeRey Thanks so much for your interest in this topic. I looked at your ggsmoothfit stuff and this On springs, you are right that the tension should be proportional to spring length (not squared). I've begun to work on a vignette that will describe all the physics and the implementation. Here is what I did to illustrate finding the centroid of a bivariate sample by springs. I'm setting
When I call
I get: I take your point: linear tension this should be the default, but I don't quite know how to implement this. I think your code removed Finally: the spring constant,$k$ was set in my code to
|
Beta Was this translation helpful? Give feedback.
-
@EvaMaeRey I incorporated your PR#1. Thx. I'm still getting a Note and Warning I don't understand and don't know how to fix when I check the package:
I got rid of that by restoring
The Warning says:
But, they are documented in
I'm still a bit at sea trying to understand how to document |
Beta Was this translation helpful? Give feedback.
-
No more I completed a vignette in which I describe, more than I've seen before, the physics of least squares by springs, some of the history and relation to geometric / algebraic solutions for least squares. What's missingFor regression problems, it is inconvenient to have to fit the same model that has been constructed by I copied @EvaMaeRey 's code to Smoothing methods & familiesIt is also important to be able to construct spring plots for any model method that can be represented
Any ideas / help in implementing these in the package would be very welcome. |
Beta Was this translation helpful? Give feedback.
-
Is there some way I can create a link to a readable version of my vignette? The GitHub link: https://github.com/friendly/ggsprings/blob/master/doc/least-squares.html just shows the raw HTML. It's still to early to go to |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've long been interested in data visualization to illustrate statistical ideas by their physical analogs, and a prime case is least squares regression as a case of points connected to a movable line by springs.
A blog post by Joshua Loftus, Least squares by springs illustrates this, and the code derives from the
ggplot2
book, https://ggplot2-book.org/ext-springsI've taken that code, and created a ggSprings package. It works, in so far as the examples in the
ggplot2
book, but is not yet usable for my intended purposes, described in theREADME
.I'm asking if anyone in the ggplot-extension-club is willing to help or, hopefully become a collaborator on this project. I'm happy to add anyone interested as a package author, or even give it up to someone who wants to take it over as the maintainer.
Here's my current TODO list
TODO
Finish documenting the package. I don't quite know how to document a
ggproto
or to use@inheritParams
for ggplot2 extensions. Add some more examples illustrating spring aesthetics andfeatures.
Use the package to re-create the gapminder example.
Try to use
gganimate
for an animated example.Make a hex logo
Write a vignette explaining the connection between least squares and springs better. ...
Beta Was this translation helpful? Give feedback.
All reactions