Make patterned data: sequences for experiments and gage studies

Updated

Make patterned data fills a new column with a regular sequence of numbers: 1 to 12, 0 to 1 in steps of 0.1, 10 down to 0. It can also repeat each value and repeat the whole list, which is exactly what you need to lay out the factor columns of an experiment or a gage study, where every combination of settings must appear the same number of times. Typing those columns by hand is slow and easy to get wrong; a pattern is quick and checkable.

When to use it

  • You need a run number or sample number column, 1 to n.
  • You are planning an experiment and want one column per factor, with every combination of levels listed.
  • You are setting up a gage study: parts, operators and trials in a regular layout.
  • You want an evenly spaced grid of values, such as temperatures every 5 °C, to compute a curve with the calculator.
  • You need a time index for readings taken at fixed intervals.

How to do it in StatLab

  1. Choose Calc › Make patterned data….
  2. Fill in From (the first value), To (the last) and In steps of. The step can be a decimal, and negative to count down. The defaults give 1 to 10 in steps of 1.
  3. Set Repeat each value (times): 2 turns 1 2 3 into 1 1 2 2 3 3.
  4. Set Repeat the whole list (times): 2 turns 1 2 3 into 1 2 3 1 2 3. Both repeats can be used together.
  5. Optionally type a Name of the new column. The preview shows how many values you will get and the first ones, such as 12 values: 150, 150, 170, ….
  6. Press OK. The column goes after the last column in use, and Results says, for example, Stored 12 values in C2. Ctrl+Z undoes it.

A sequence stops at the last value that does not go past To: 0 to 1 in steps of 0.3 gives 0, 0.3, 0.6, 0.9. If the step points away from To, or the column would be longer than a million values, the preview says so and OK stays off. Repeat counts must be whole numbers of 1 or more.

The length of the column is:

rows = (values in the list) × (repeat each) × (repeat whole list)

Example

A coating line wants to know how cure temperature and cure time affect paint adhesion. The plan is a full factorial: three temperatures (150, 170 and 190 °C) and two times (10 and 20 min), so six combinations, each run twice. That is 12 runs.

Starting from an empty worksheet, the engineer makes four columns:

ColumnFromToIn steps ofRepeat each valueRepeat the whole listRows
Run11211112 × 1 × 1 = 12
Replicate121612 × 6 × 1 = 12
Temperature15019020223 × 2 × 2 = 12
Time102010162 × 1 × 6 = 12

The worksheet after the four commands:

C1 RunC2 ReplicateC3 TemperatureC4 Time
1115010
2115020
3117010
4117020
5119010
6119020
7215010
8215020
9217010
10217020
11219010
12219020

Each replicate holds all six temperature and time combinations once. The trick is the order of the factors, from slowest-changing to fastest:

  • The fastest factor (Time) repeats each value once and repeats the list to fill the rows: 12 ÷ 2 = 6 times.
  • The next factor (Temperature) repeats each value as many times as the faster factor has levels, 2, and repeats its list 12 ÷ (3 × 2) = 2 times.
  • The slowest factor (Replicate) repeats each value 3 × 2 = 6 times, the number of combinations of the faster factors.

The adhesion results then go into a fifth column as the runs are done. See design of experiments and factorial designs for how such a plan is analyzed.

How to read the results

  • Check the count in the preview before pressing OK. Every factor column of a study should have the same length; if one says 10 values and another 12, a setting is off.
  • Scan the first rows of the new column. The preview shows up to 12 values, enough to see whether each value repeats the way you meant.
  • Check the combinations. In a full factorial, every combination of levels appears the same number of times. In the example, each of the six temperature and time pairs appears exactly twice.

Common mistakes

  • A step in the wrong direction. From 10 to 0 in steps of 1 never arrives, so the preview says These values never reach the end, or make more than a million values. Use a step of −1.
  • Expecting To to be included. It is included only if the steps land on it. 0 to 1 in steps of 0.3 ends at 0.9.
  • Columns of different lengths. If one factor column is shorter, its last rows are empty and those runs have no setting. Use the row formula above for every column.
  • Running trials in table order. The patterned order is for planning. Run the trials in a random order where you can, so that drift in the material, the weather or the operator does not line up with a factor, and record the actual run order in its own column.
  • Wanting text levels. The dialog makes numbers. For labels such as Low and High, make codes 1 and 2, then use Recode values.

Frequently asked questions

How do I lay out a gage study?

For 10 parts measured twice by each of 3 operators (60 rows): parts from 1 to 10, each value 2 times, whole list 3 times; operators from 1 to 3, each value 20 times; trials from 1 to 2, each value once, whole list 30 times. See crossed gage R&R for the analysis.

Can I make a column of dates?

Not with this dialog, but two steps do it. Make a day number, such as 1 to 5, in a column named Day, then use the calculator with DATE(2026, 12, 1) + 'Day' - 1, which gives 1 to 5 December 2026.

Does it overwrite a column?

No. It always fills a new column after the last one in use.

Why do decimal steps give clean numbers?

StatLab rounds each value to the decimals of the start and the step, so 0 to 1 in steps of 0.1 gives exactly 0.3, not 0.30000000000000004.

Try it with your own data

StatLab SPC is free, open-source statistics for engineers. It runs in your browser, works offline, and never uploads your data.

Open StatLab