checkfactorlevelcounts: Factor level response check This function checks that there...

View source: R/functions.R

checkfactorlevelcountsR Documentation

Factor level response check This function checks that there are some non-zero counts in each level of each factor variable for consideration in a model

Description

Factor level response check

This function checks that there are some non-zero counts in each level of each factor variable for consideration in a model

Usage

checkfactorlevelcounts(factorlist, data, response)

Arguments

factorlist

Vector of factor variables specified in model. Specified so that a check can be made that there are non-zero counts in all levels of each factor.

data

Data frame containing columns of covariates listed in factorlist. Column names must match with names in factorlist

response

A vector of response values

Examples

# load data
data(ns.data.re)

checkfactorlevelcounts(factorlist=c('floodebb', 'impact'), ns.data.re, 
     ns.data.re$birds)


lindesaysh/MRSea documentation built on May 1, 2024, 6:31 p.m.