Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure Advice #1973

Open
aspencoyle opened this issue Oct 7, 2024 · 6 comments
Open

Figure Advice #1973

aspencoyle opened this issue Oct 7, 2024 · 6 comments

Comments

@aspencoyle
Copy link
Contributor

Hi all,

Creating a figure showing model coefficients, and I'm looking for some aesthetic advice!

Should I stick with my current figure, which orders the predictor variables in alphabetical order (aside from intercept, which I placed at the top since it's not a predictor)? or should it be ordered based on absolute value of estimated coefficient instead?

Figure below - would love any thoughts!

Fig2_full_model_coefficients

@kubu4
Copy link
Contributor

kubu4 commented Oct 7, 2024

You mentioned Intercept not being a predictor. Can it be excluded from the plot? I think that would help "center" the plot a bit. Currently, my eye is immediately drawn to Intercept because it's so far removed from the other categories.

@kubu4
Copy link
Contributor

kubu4 commented Oct 7, 2024

I'll also add that I don't know what Estimated Coefficient means and what the significance of these values represent.

With that being said, it might be worth ordering these by Estimated Coefficient instead of alphabetical order, but I'm not sure if the values should be sorted low-to-high or high-to-low.

@AHuffmyer
Copy link
Contributor

The Intercept in this case represents the value when all other factors are at the reference level (for factors) or 0 (for continuous predictors). I think that unless you have a specific hypothesis about the intercept it can be removed.

I agree that using arrange(coefficient) will order the factors on the y-axis by magnitude of the coefficient, which would make a nice visual!

You could also add astericks to denote significant vs non-significant predictors on the plot, or have significant predictors show as black while non-significant show as gray.

Nice work!!

@aspencoyle
Copy link
Contributor Author

Great advice, thanks Ariana and Sam!

@aspencoyle
Copy link
Contributor Author

Alright hold on, got another aesthetic question here!

Important background: I have three models I'm examining. There's a general model, which looks at around 200,000 individuals. That's the really important one, and the one that's really the centerpiece of my paper.

I also have a female-specific and male-specific model, both of which only take into account crabs with maturity data. Each of those is about 1/10th the size, with 20,000 crabs measured.

Option One: present the coefficient plots as two figures - one with coefficients for the General Model, the other with coefficients from the sex-specific models. Benefits: highlights the importance of the General Model, doesn't cause the axis to be squished. Downsides: takes up more space

Option Two: present the plots of all coefficients as a single image with axes matching, as below. A is the general model, B is the female-specific model, C is the male-specific model.

Basically, in the image below, should I split off the top graph (which is for the really important General Model) into its own figure, or keep as is?

test

@AHuffmyer
Copy link
Contributor

I think I would be in favor of one figure with the general model, this will draw attention to the effect of Sex a bit better, which is what justifies your additional sex-specific models. You could then have your second figure be the sex-specific models and label MALE and FEMALE on top of each panel to make it clear. You could also superimpose the coefficients of both sexes into one panel if your aim is to compare differences in model effects between males and females. For example, you could color males and females as different colors and then the reader could very easily see that the effect of shell conditioning is larger in males vs females.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants