plotglm: Title

Description Usage Arguments Value Examples

View source: R/glmplot.R

Description

Title

Usage

1
2
plotglm(icon = fir, iex = NULL, colo = c("darkgreen", "green"), rot = 0,
  str = 1, data, ...)

Arguments

icon

symbol as a matrix

iex

iconsize scaling factor

colo

extreme colors

rot

rotation in degrees for every symbol

str

horizontal stretch factor applied to every symbol

data

dataframe of simulated data, e.g. by function rglm

...

input to function lines()

Value

plots scatterplot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
plotglm(data=rglm(s=3),str=0.5)
plotglm(icon=E.coli,colo=c("gray","yellow"),col="darkgrey",
   data = rglm(dist="poisson",xes=list(x1=c(10,170),x2=3,x3=9,x4=2)))
# Regressoren bedeuten: x-Achse, Farbe, Größe, Drehung
daten <- rglm(dist="poisson",
               xes=list(x1=c(10,20),x2=2,x3=c(0.7,2.5),x4=c(-2,6)),
              beta=c(1,0.5,2,.03,1,0.7))
plotglm(icon=E.coli,colo=c("gray","green"),col="darkgrey",rot=10, iex=.2, str=0.3, data = daten)
daten <- rglm(n=12,dist="binomial", xes=list(x1=c(7,14),x2=1,x3=1,x4=1), beta=c(0,0.032,0,0,0,0))
daten[,5] <- daten[,1]
daten[,4] <- daten[,2]/10
plotglm(icon=zebrafish,colo=c("n"),col="black",rot=pi, iex=.04, str = 1.3, data = daten)
est <- glm(y~x.x1,family='binomial',data=daten)
new <- data.frame(x.x1=(1:200)/10)
odd <- exp(predict(est,newdata=new))
P <- odd/(1+odd)
lines(new$x.x1,P)
abline(v=-est$coefficients[1]/est$coefficients[2],h=c(0,0.5,1),lty=2)

## End(Not run)

vonthein/illustrator documentation built on Nov. 7, 2019, 4:32 p.m.