dataComp: dataComp

Description Usage Arguments Details Value Author(s) Examples

Description

This function judges whether a dataset has a profile changes.

Usage

1
2
3
dataComp(old,new,alpha=0.01,obs.lim=5)

varComp(old, new, alpha = 0.05, obs.lim)

Arguments

old

data frame or vector. It holds the original data or data you are expecting.

new

data frame or vector. It holds the data you want to test.

alpha

significant level. By defaul, is 0.01.

obs.lim

integer. To specify the a limit that factor levels with no more than this integer will not be tested.

Details

A string vector will be return indicating factors that have a profile change if both old and new are data frame. If old and new are vector, then TRUE / FALSE will be returned.

Currently, this function will not test those levels with less than 5 obs.

A fisher exact test would be more suitable.

Value

This function will return a data.frame if inputs are data.frame. 'NULL' - means there are no levels have more than obs.lim, hence Chi-square test is not conducted. 'NA' - p-value is 'NA', because some levels have 0 observations. 'Nochange' - cannot reject the null hypothesis that there is no change. 'Changed' - reject the null hypothesis that there is no change.

Author(s)

Sixiang Hu

Examples

1
2
3
4
5
data(mtcars)
x <- mtcars
y <- rbind(mtcars,mtcars)
y$am[1:10] <- 1
dataComp(x,y)

SixiangHu/DataMan documentation built on May 9, 2019, 1:48 p.m.