MomentsInPartitions: The first four moments (mean, standard deviation, skewness,...

Description Usage Arguments Value Author(s) References Examples

View source: R/MomentsinPartitions.R

Description

This function gives the first four moments in total, common and special cause periods. Partitioning of common and special cause periods is based on the Shewhart S chart.

Usage

1
MomentsInPartitions(PartitonedData, Subgroups)

Arguments

PartitonedData

common and special cause partitions

Subgroups

a list of subgroups used for partitioning

Value

Mean, standard deviation, skewness and kurtosis in total, common and special caused periods

Author(s)

Nadeeka Premarathna

References

Nadeeka Premarathna, A. Jonathan R. Godfrey and K. Govindaraju. "Decomposition of stock market trade-offs using Shewhart methodology." International Journal of Quality & Reliability Management 33, no. 9 (2016): 1311-1331.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# subgroup size
SubgroupCriteria="weeks"
# data loading
data(AAPL)
#subgrouping
require(zoo)
StockPrice=window(AAPL[,"Close"],start=as.Date("2012-01-02"),end=as.Date("2014-12-31"))
Subgroups=Subgrouping(StockPrice,SubgroupCriteria,CountSgps=1)
# obtain subgroup summary
DataSum=SubgroupSummary(Subgroups,MaxSgpSize=5)
# partitioning data into common and special cause periods
PartitonedData=PartitioningSgps(DataSum,ChartType="S")
# calculate the first four moments
MomentsInPartitions(PartitonedData$SgpSummary,Subgroups)

npremara/QCCTS documentation built on May 5, 2019, 3:51 a.m.