Learn R Programming

cNORM (version 3.6.2)

bb_prepare_data: Validate and clean age / score / weights input

Description

Performs the shared input validation for the beta-binomial fitting functions: length checks, removal of non-finite cases, weight validation, and checks for negative or non-integer scores as well as degenerate predictor variance.

Usage

bb_prepare_data(age, score, weights = NULL)

Value

A list with the (possibly filtered) elements age, score, weights.

Arguments

age

Numeric vector of predictor values.

score

Numeric vector of response values.

weights

Optional numeric vector of weights.