knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
Install the package SNSchart
hosted in github.
install_github("LuisBenavides/SNSchart")
Load the package
library("SNSchart")
Get dataset from Example 8.2 \code{example82} by @qiu_2013 (see Example 3.1.1 from @conover_etal_2019)
X = SNSchart::example82$X X.id = SNSchart::example82$X.id
Table with the dataset using dataframe of \code{R} (first 10 rows).
knitr::kable(head(SNSchart::example82, 10))
Get the sns of the dataset
s = SNSchart::SNS(X=X,X.id=X.id)
to plot it
plot(s)
X = SNSchart::example82$X #get the dataset into a data frame X.id = SNSchart::example82$X.id s = SNSchart::SNS(X=X,X.id=X.id) plot(s)
Get dataset from Example 8.4 \code{example84} by @qiu_2013 (see Example 3.2.1 from @conover_etal_2019)
X = SNSchart::example84$X X.id = SNSchart::example84$X.id
Table with the dataset using dataframe of \code{R} (first 10 rows).
knitr::kable(head(SNSchart::example84, 10))
Get the sns of the dataset using a CUSUM scheme
s = SNSchart::SNS(X=X,X.id=X.id, chart="CUSUM", chart.par=c(0.5, 4.389, 3))
to plot it
plot(s)
X = SNSchart::example84$X #get the dataset into a data frame X.id = SNSchart::example84$X.id s = SNSchart::SNS(X=X,X.id=X.id, chart="CUSUM", chart.par=c(0.5, 4.389, 3)) plot(s)
Load package and get dataset from Example 8.4 \code{example84} by @qiu_2013 (Example 3.2.1 from @conover_etal_2019)
X = SNSchart::example84$X X.id = SNSchart::example84$X.id
Table with the dataset using dataframe of \code{R} (first 10 rows).
knitr::kable(head(SNSchart::example84, 10))
Get the sns of the dataset using a EWMA scheme
s = SNSchart::SNS(X=X,X.id=X.id, chart="EWMA", chart.par=c(0.01, 2.0171))
to plot it
plot(s)
X = SNSchart::example84$X #get the dataset into a data frame X.id = SNSchart::example84$X.id s = SNSchart::SNS(X=X,X.id=X.id, chart="EWMA", chart.par=c(0.01, 2.0171)) plot(s)
Load package and get dataset from Example 8.7 \code{example87} by @qiu_2013 (Example 3.5.1 from @conover_etal_2019)
X = SNSchart::example87$X X.id = SNSchart::example87$X.id Y = SNSchart::example87$Y
Table with the dataset using dataframe of \code{R} (first 10 rows).
knitr::kable(head(SNSchart::example87, 10))
Get the sns of the dataset using a EWMA scheme
s = SNSchart::SNS(X=X,X.id=X.id, Y=Y, chart="EWMA", chart.par=c(0.01, 2.0171))
to plot it
plot(s)
X = SNSchart::example87$X #get the dataset into a data frame X.id = SNSchart::example87$X.id Y = SNSchart::example87$Y s = SNSchart::SNS(X=X,X.id=X.id, Y=Y, chart="EWMA", chart.par=c(0.01, 2.0171)) plot(s)
Load package and get dataset from Example 4.9 \code{example49} by @qiu_2013 (Example 4.3.1 from @conover_etal_2019)
X = example49$X2 X.id = example49$X.id Y = example49$Y2
Table with the dataset using dataframe of \code{R} (first 10 rows).
knitr::kable(head(SNSchart::example49, 10))
Get the SNS^2 of the dataset using a Shewhart scheme. In the example the reference sample is fixed therefore \code{isFixed=TRUE}.
s = SNSchart::SNS(X=X,X.id=X.id, Y=Y, chart="Shewhart", scoring="Z-SQ",isFixed = TRUE)
to plot it. Only the plot of the monitoring sample is presented.
plot(s)
X = SNSchart::example49$X2 X.id = SNSchart::example49$X.id Y = SNSchart::example49$Y2 s = SNSchart::SNS(X=X,X.id=X.id, Y=Y, chart="Shewhart", scoring="Z-SQ",isFixed = TRUE) plot(s)
Get dataset from Example 9.1 \code{example91} by @qiu_2013 (see Example 6.1.1 from @conover_etal_2019).
X = SNSchart::example91[,1:2] X.id = SNSchart::example91$X.id
Table with the dataset using dataframe of \code{R} (first 10 rows).
knitr::kable(head(SNSchart::example91, 10))
Get the multivariate sequential normal scores
msns = SNSchart::MSNS(X, X.id)
and plot it
plot(msns)
X = SNSchart::example91[,1:2] #get the dataset into a data frame X.id = SNSchart::example91$X.id msns = SNSchart::MSNS(X, X.id) plot(msns)
Get dataset from Example 9.3 \code{example93} by @qiu_2013 (see Example 6.2.1 from @conover_etal_2019).
X = SNSchart::example93[,1:2] X.id = SNSchart::example93$X.id
Table with the dataset using dataframe of \code{R} (first 10 rows).
knitr::kable(head(SNSchart::example93, 10))
Get the multivariate sequential normal scores. Null distribution considered is the \code{F} statistic.
msns = SNSchart::MSNS(X, X.id, null.dist = "F")
and plot it
plot(msns)
X = SNSchart::example93[,1:2] #get the dataset into a data frame X.id = SNSchart::example93$X.id msns = SNSchart::MSNS(X, X.id, null.dist = "F") plot(msns)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.