betaCheck: betaCheck function

Description Usage Arguments Value Examples

Description

Given starting values for the beta values on the first level of the ecological inference model, betaCheck checks if parameters are correctly specified

Usage

1
betaCheck(arr, r, c, prec)

Arguments

arr

array with beta values. 1st dimension: rows, 2nd dimension columns, 3rd dimension precincts

r

number of rows in the RxC-table

c

number of cols in the RxC-table

prec

number of precincts

Value

betaarry if everything is okay. Error-message if something fails.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
# right beta array
beta1 <- rep(c(0,0.25,0.75), each=3)
beta2 <- rep(beta1, 3)
betaRight <- array(beta2, dim=c(3,3,3))
betaCheck(betaRight, 3,3,3)

# wrong beta array
betaWrong <- array(1:27, dim=c(3,3,3))
betaCheck(betaWrong)

## End(Not run)

eiwild documentation built on May 2, 2019, 6:31 p.m.

Related to betaCheck in eiwild...