statsSpcFun {qAnalyst}R Documentation

Internal function to calculate control chart general statistics

Description

statsSpcFun receives data and desidered chart informations. StatsFun returns a list whose elements are general and chart - specific statistics.

Usage

statsSpcFun(x, sg, type = type)

Arguments

x

data vector.

sg

subgroups id, as specified in spc

type

chart type.

Details

The type of chart is compulsory.

Value

A list with the following items:

numTot

total number of elements in x.

numNNmissing

total number of non - missing elements in x.

numMissing

total number of missing elements in x.

nGroupsX

total number of groups in x.

meanX

mean of x.

minX

min of x.

maxX

max of x.

sdTotX

total standard deviation of x.

sdWithinX

sd within of x.

sdBetweenX

sd between of x.

meanRangeX

mean range of x.

Note

Return a list used by spc.

Author(s)

Giorgio Spedicato

References

Internal function

See Also

spc, print.spc

Examples

#simple example
set.seed(100)
x=c(rnorm(30,m=10,s=1), rnorm(30,m=12,s=1), rnorm(30,m=10,s=4))
sg=sort(rep(1:30,3))
statsList=statsSpcFun(x=x, sg=sg, type = "xbar")
str(statsList)

[Package qAnalyst version 0.6.4 Index]