View source: R/logi.hist.plot.R
logi.hist.plot | R Documentation |
Plot combined graphs for logistic regressions
logi.hist.plot(
independ,
depend,
logi.mod = 1,
type = "dit",
boxp = TRUE,
rug = FALSE,
ylabel = "Probability",
ylabel2 = "Frequency",
xlabel = "",
mainlabel = "",
las.h = 1,
counts = FALSE,
...
)
independ |
explanatory variable |
depend |
dependent variable, typically a logical vector |
logi.mod |
type of fitting, 1 = logistic; 2 = "gaussian" logistic |
type |
type of representation, "dit" = dit plot; "hist" = histogram |
boxp |
TRUE = with box plots, FALSE = without |
rug |
TRUE = with rug plots, FALSE = without |
ylabel |
y-axis label |
ylabel2 |
2nd y-axis label |
xlabel |
x-axix label |
mainlabel |
overall title for plot |
las.h |
orientation of axes labels (0 = vertical, 1 = horizontal |
counts |
add counts above histogram bars |
... |
additional options passed to logi.hist |
A logistic regression plot
M. de la Cruz Rot
de la Cruz Rot, M. 2005. Improving the Presentation of Results of Logistic Regression with R. ESA Bulletin 86:41-48. http://esapubs.org/bulletin/backissues/086-1/bulletinjan2005.htm
aq.trans$survived <- aq.trans$fate!="dead"
a <- subset(aq.trans, leaf<50 & stage!="recruit", c(leaf,survived))
logi.hist.plot(a$leaf, a$survived,
type="hist", boxp=FALSE, counts=TRUE, int=10,
ylabel="Survival probability", ylabel2="Number of plants",
xlab="Number of leaves")
b <- glm(survived ~ leaf, binomial, data=a)
summary(b)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.