betaCheck {eiwild} | R Documentation |
Given starting values for the beta values on the first
level of the ecological inference model, betaCheck
checks if parameters are correctly specified
betaCheck(arr, r, c, prec)
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 |
betaarry if everything is okay. Error
-message if
something fails.
## 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)