realcriteria: Properly calculated POSAC criteria.

Description Usage Arguments Examples

Description

This function counts (weighted) number of pairs that are in the correct order in terms of X and Y.

Usage

1
realcriteria(XY, gam, Freq, printwarn = TRUE)

Arguments

XY

A concatenated vector of the the x-coordinates and y-coordinates for each combination of values for the covariates (i.e. should have length 2n if n if the number of combinations we are interested in).

gam

The matrix of gamma values.

Freq

The number of observations with each combination of covariate values.

printwarn

Logical input denoting whether the function should print a message about the number of equal pairs not counted in calculations.

Examples

1
2
3
4
posac2=POSAC(CRASdata[,1:5],CRASdata[,6])
realcriteria(c(posac2$X,posac2$Y),gamfunc(CRASdata[,1:5]),CRASdata[,6])
#Compare to applying random X and Y coordinates
realcriteria(c(rnorm(dim(CRASdata)[1]),rnorm(dim(CRASdata)[1])),gamfunc(CRASdata[,1:5]),CRASdata[,6],printwarn=FALSE)

CambridgeAssessmentResearch/POSAC documentation built on May 28, 2019, 12:16 p.m.