chisq.gof.y: Chi-squared goodness-of-fit in forward dimension.

View source: R/gof.R

chisq.gof.yR Documentation

Chi-squared goodness-of-fit in forward dimension.

Description

Calculates Chi-squared goodness-of-fit in forward dimension, plots fit, and returns p-value and other stuff. Returns a data frame (goftable) with columns for start and end of bins, observed and expected frequencies in the bins, and the Chi-squared statistic for the bin. Also returns the Chi-squared statistic(X2stat), the degrees of freedom of the test (df), and the associated p-value (p.Chisq).

Usage

chisq.gof.y(fit, breaks, nys = 250)

Arguments

breaks

cutpoints on forward-distance axis defining bins

nys

number of y-values at which to calculate function before using approxfun approximate it at arbitrary resolution.

hmltm

fitted model, as output by est.hmltm

Details

Uses approxfun to approximate the forward distance pdf and then uses integrate to integrate it within each bin.


david-borchers/hmltm documentation built on Oct. 29, 2023, 9:07 p.m.