Description Usage Arguments Value Author(s) References Examples
View source: R/MomentsinPartitions.R
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.
1 | MomentsInPartitions(PartitonedData, Subgroups)
|
PartitonedData |
common and special cause partitions |
Subgroups |
a list of subgroups used for partitioning |
Mean, standard deviation, skewness and kurtosis in total, common and special caused periods
Nadeeka Premarathna
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.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.