Created
September 30, 2021 18:36
-
-
Save MJacobs1985/e3b9be840d5afd62d9fa3aa4313186c2 to your computer and use it in GitHub Desktop.
How many samples do you need
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Plot Power curve | |
ggplot(powervalue, | |
aes(x=N, | |
y=Power, | |
col=ES, | |
group=ES))+ | |
geom_line() + | |
theme_bw()+ | |
scale_x_discrete(limits=seq(1,35,1))+ | |
geom_hline(yintercept=80, linetype="dashed", color = "red", size=0.5)+ | |
scale_colour_gradient2(midpoint=25,low="red",mid="orange",high = "green")+ | |
labs(x="Number of Fish", y="Power", | |
title="Power Curve for Number of Fish Randomly Selected from a Dataset with a Significant Model Effect") | |
ggsave("PowerCurve.png", plot = last_plot(), device = NULL, path = NULL, | |
scale = 1, width = 15, height = 10, units = "in", | |
dpi = 600) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment