conf_inter: Add confidence intervals to a plot

Description Usage Arguments Examples

Description

Add confidence intervals to a plot. Provide x and y vectors. Values can be Standard error (stder= TRUE,SE=SE) or upper condidence intervals and lower confidence itnervals (stder= FALSE).

Usage

1
conf_inter(x, y, se=SE, stder=TRUE, low_ci=lowci, up_ci=upci, z=0.1,col="black",lty=1, lwd=1)

Arguments

x

vectors of values on the x axis

y

vectors of values on the y axis, mean values

SE

vectors of values on the for the standard error or CI

stder

TRUE if you have SE values (1.96*SE), FALSE if you already have CI limits

low_ci

vector with lower confidence limits

up_ci

vector with upper confidence limits

z

how large should the end of the forizontal line of the confidence interval, default is 0.1

col

color, default is black

lwd

lwd line width, default is 1

lty

line type, default is 1

Examples

1
2
3
4
5
names    <- c("rodents","insectivores","hare",
"carnivores","carrion","insects","plants",
"birds","ungulates")
red_fox <- c(29,9.8,15,2.5,29.4,1.3,9.5,3.5,0)
levin(red_fox,stand=TRUE)

cyrilmi/teaching documentation built on May 14, 2019, 1:40 p.m.