Closed christophergandrud closed 9 years ago
Dear Christopher,
Thank you for your contribution.
However, would it be possible to have a reproducible example? In addition to that, I think that the feature it aims to add is indeed present in ggmcmc, and it is the paramlabel, which works for all sort of ggs() functions.
Sorry, I didn't notice the par_labels
argument before.
That being said. It might be nice to be able to set the labels for subsets of parameters that are being plotted. My motivation for this is that I have a model with about 1000 parameters and setting them with for the full sample could take forever.
This might be an extreme case and possibly not worth addressing in the main package.
You can always play with the "family" parameter as well
Combining "family" and "par_labels" can be very convenient.
For example, you can subset a family of parameters when doing the ggs(object, family="") conversion (therefore, only some parameters are taken into account), or you can use it when dealing with the plotting functions (ggs_histogram(S, family="").
In the first case, the resulting object is much smaller, because the "family" is applied before, whereas in the second case the "S" object is assumed to contain everything.
In addition to that, "par_labels" does not need all parameters to have their labels. It will use the original labels in case there is no correspondence.
What I don't exactly understand is the "could take forever" in your sentence. Maybe some code would help, if you can provide it.
Dear Christopher, After my explanations on how to combine "par_labels" and "family" I would consider this pull request closed. But if you still think that I should consider it again, please, reopen the pull request.
That's fine with me.
I added a capability to
ggs_caterpillar
that allows the user to change the parameter labels right before plotting.It does this with two new options:
param_label_from
andparam_label_to
.In theory it would be easy to add this capability to the other plotting functions.
I can send along a reproducible example if you would like.