ChiSq: Chi Square

Description Usage Arguments Functions

Description

This function produces a table and runs a Chi Square test on counts of binned data or Poisson Ditrsibutions.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
ChiSq.Bins(
  bin.bounds,
  ObsFreq,
  mean,
  sd,
  NullDist = c("normal", "uniform"),
  df = length(ObsFreq) - 1
)

ChiSq.pois(
  counts,
  ObsFreq,
  lambda = sum(counts * ObsFreq)/sum(ObsFreq),
  boundary = c("neither", "greater", "less"),
  df = length(ObsFreq) - 1
)

Arguments

bin.bounds

A numeric vector for the boundaries of the bins. -Inf and positive Inf will automatically be added to each end.

mean

The sample x-value mean of the data

sd

The standard deviation

NullDist

The expected distribution under the null hypothesis. Currently supports normal and uniform

df

Degrees of freedom

counts

A numeric vector of the frequencies of occurence within the time unit.

lambda

The parameter of the Poission distribution; will be calculated if not provided.

Obs.Freq

A numeric vector of the time units for each count.

Functions


alitvak3/a3personal documentation built on April 6, 2021, 4:53 a.m.