dssAggregate: Compute the DSS on Aggregated Predictions and Observations

dssAggregateR Documentation

Compute the DSS on Aggregated Predictions and Observations

Description

The expectation and variance of aggregated predictions is just a sum if the predictions are (conditionally) independent. This function computes the DSS for a matrix of observations and a matrix of predictions where the columns are to be summed according to a given factor.

Usage

dssAggregate(observed, pred, psi, groups)

Arguments

observed

a numeric matrix of observed counts.

pred

a numeric matrix of predicted counts.

psi

a numeric vector or matrix of overdispersion parameters such that pred * (1 + pred/exp(psi)) is the prediction's variance. Alternatively, psi = NULL indicated Poisson predictions.

groups

a factor variable of length ncol(observed) indicating which columns should be aggregated.

Value

a matrix of DSS values


hhh4contacts documentation built on Oct. 8, 2024, 1:08 a.m.