Using R to Fix Data Quality: Section 6
2013-04-13 20:22
260 查看
Section 6: Control Charts
Overview
A common issue in the field of process control and manufacturing is that how to find the sudden spike in productions. A control chart can make a view to show us which productions are different from others. In this section, we are going to talk about howto create a control chart.
Proportions Control Charts
There is more than one way to create a control chart. In this demo, we prefer to create a proportions control charts.A reference of it: http://www.itl.nist.gov/div898/handbook/pmc/section3/pmc332.htm
Read CSV data
The data we are going to use in this demo is wafers.csv. As can be seen, there are two columns in the table. One is Sample.Number, and the other is Fraction.Defectives> data = read.csv('wafers.csv')
> head(data)
Sample.Number Fraction.Defectives
1 1 0.24
2 2 0.30
3 3 0.16
4 4 0.20
5 5 0.08
6 6 0.14
Count the mean of defectives:
> pbar=mean(data$Fraction.Defectives)Count the upper control limit (UCL) and lower control limit (LCL):
> sd=sqrt((pbar*(1-pbar))/50)> ucl=pbar +(3*sd)
> lcl=pbar-(3*sd)
Create the chart:
> plot(data$Fraction.Defectives, type="b", ylim=c(0,1), ylab="proportion defective")> abline(h=pbar,lw=2)
> abline(h=ucl,lw=1)
> abline(h=lcl,lw=1)
Congratulations! You have completed your Control Chart.
Practice Question
1. Is there any process out of control? If so, which points?2. What are the values of the UCL and LCL?
相关文章推荐
- Using R to Fix Data Quality: Section 5
- Using R to Fix Data Quality: Section 7
- Using R to Fix Data Quality: Section 8
- Using R to Fix Data Quality: Section 0
- Using R to Fix Data Quality: Section 1
- Using R to Fix Data Quality: Section 2
- Using R to Fix Data Quality: Section 3
- Using R to Fix Data Quality: Section 4
- Using Oracle Data Pump to create an external table
- Using Fixpoint to Solve Mathmatic Equation ( 无限float运算的扩展 fixpoint style)
- using bgp data to find spammers
- Using Networking to Retrieve Data and Populate a DataGrid
- Using the Android Application class to persist data
- Provide an Alternative View to Data Using Splitter Window
- Store binary data to MySQL using escape_string in MySQLdb
- JMP Start Statistics: A Guide to Statistics and Data Analysis Using Jmp, Fourth Edition
- HOW TO: Transfer Data to an Excel Workbook by Using Visual Basic .NET
- BW--ABAP code using BAPI's to load data into Cube from SpreadSheets
- Collecting performance counters and using SQL Server to analyze the data
- A Data Access Layer to persist business objects using attributes and reflection - Part III [无常译]