Learn R Programming

AgroR (version 1.3.6)

confinterval: Utils: Interval of confidence for groups

Description

Calculates confidence interval for groups

Usage

confinterval(resp, group, alpha = 0.95, type = "upper")

Value

returns a numeric vector with confidence interval grouped by treatment.

Arguments

resp

numeric vector with responses

group

vector with groups or list with two factors

alpha

confidence level of the interval

type

lower or upper range

Examples

Run this code

#===================================
# One factor
#===================================

dados=rnorm(100,10,1)
trat=rep(paste("T",1:10),10)
confinterval(dados,trat)

#===================================
# Two factor
#===================================
f1=rep(c("A","B"),e=50)
f2=rep(paste("T",1:5),e=10,2)
confinterval(dados,list(f1,f2))

Run the code above in your browser using DataLab