chi_cont_test: Chi-square test for 2D data

View source: R/chisq2D_test.R

chi_cont_testR Documentation

Chi-square test for 2D data

Description

This function does the chi square goodness-of-fit test for continuous data in two dimensions.

Usage

chi_cont_test(
  dta,
  pnull,
  phat = function(x) -99,
  Ranges = matrix(c(-Inf, Inf, -Inf, Inf), 2, 2),
  nbins = c(5, 5),
  minexpcount = 5,
  SuppressMessages = TRUE
)

Arguments

dta

a matrix of numbers.

pnull

function to calculate expected counts.

phat

=function(x) -99, function to estimate parameters of pnull.

Ranges

=matrix(c(-Inf, Inf, -Inf, Inf),2,2), a 2x2 matrix with lower and upper bounds

nbins

=c(5,5) number of bins in x and y direction

minexpcount

=5 minimum counts required per bin

SuppressMessages

=FALSE, should info be shown?

Value

a matrix with statistics, p values and degree of freedoms


MDgof documentation built on Feb. 13, 2026, 1:06 a.m.