Plot combined graphs for logistic regressions
logi.hist.plot2(independ, depend, logi.mod = 1, type = "dit",
boxp = TRUE, rug = FALSE, ylabel = "Probability", ylabel2 = "Frequency",
xlabel = "", mainlabel = "", las.h = 1, counts = FALSE, cex.p = 1,
pch.dit = 1, incre = 0.02, ...)
A combined logistic regression plot
explanatory variable
dependent variable, typically a logical vector
type of fitting, 1 = logistic; 2 = "gaussian" logistic
type of representation, "dit" = dot plot; "hist" = histogram
TRUE = with box plots, FALSE = without
TRUE = with rug plots, FALSE = without
y-axis label
2nd y-axis label
x-axix label
overall title for plot
orientation of axes labels (0 = vertical, 1 = horizontal
add counts above histogram bars
size of points in dotplots
Either an integer specifying a symbol or a single character to be used as the default in plotting points. See points
for possible values and their interpretation.
increment, i.e., separation between neighbour points in the dotplot.
additional options passed to logi.hist
M. de la Cruz Rot
data(aq.trans, package="popbio")
aq.trans$survived<-aq.trans$fate!="dead"
a<-subset(aq.trans, leaf<50 & stage!="recruit", c(leaf,survived))
logi.hist.plot2(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)
Run the code above in your browser using DataLab