rk.doe is an external plug-in for RKWard that provides a Graphical User Interface (GUI) for generating and analyzing experimental designs. It leverages the power of the R packages DoE.base and FrF2 to bring industrial-grade statistical tools to RKWard, filling the gap for engineers and quality professionals who need alternatives to Minitab or Bluesky Statistics.
- Full Factorial Designs:
- Supports mixed-level designs (e.g., 2-level and 3-level factors combined).
- Options for replications, randomization, and random seeds.
- Built-in Simulation: Automatically generate a simulated response variable ("Yield") with random noise to test analysis workflows immediately.
- Fractional Factorial Designs (FrF2):
- Generate 2-level fractional designs.
- Support for Generators, Center Points, and Replications.
- Built-in Simulation: Automatically generate a simulated response variable with random noise.
- ANOVA: Automated Analysis of Variance tables for the experimental model.
- Main Effects Plots: Visualize the impact of individual factors on the response.
- Interaction Plots:
- Smart Detection: Automatically uses
FrF2::IAPlotfor 2-level designs (interaction matrix). - Fallback Logic: Automatically generates standard base R interaction plots for designs with >2 levels (mixed/general factorial).
- Smart Detection: Automatically uses
- Live Preview: Toggle between Main Effects and Interaction plots in the preview window before printing results to the output.
This plugin relies on the following R packages:
DoE.baseFrF2rkwarddev(for development/building)
- Open R in RKWard.
- Run the following commands in the R console:
require(devtools)
## Computar
install_github(
repo="AlfCano/rk.doe"
)- Restart RKWard to ensure the new menu items appear correctly.
The plugin adds a new entry to the main menu under: Analysis > Design of Experiments (DoE)
- Navigate to Analysis > Design of Experiments (DoE) > Full Factorial Design.
- Levels per factor: Enter
2, 2, 3(for two 2-level factors and one 3-level factor). - Factor Names: (Optional) Enter names like
Temp, Pressure, Speed. - Simulation: Check "Add Simulated Response" to create a dummy "Yield" column automatically. Keep "Response Name" as
Yield. - Save Design as: Enter a name (e.g.,
my_experiment). - Click Submit.
- Navigate to Analysis > Design of Experiments (DoE) > Analyze Design.
- Design Object: Select
my_experimentfrom the list.- Note: If you don't see the columns inside
my_experiment, click the small+or>arrow next to the dataframe name to expand it.
- Note: If you don't see the columns inside
- Response Variable: Drag the
Yieldcolumn into this field. - Plots to Print: Check both "Print Main Effects Plot" and "Print Interaction Plot".
- Preview: Use the radio buttons to switch the preview graph between "Main Effects" and "Interaction".
- Click Submit.
- Expected Output: An ANOVA table, a general Main Effects Plot, and multiple pairwise Interaction Plots (due to the 3-level factor) will appear in separate RKWard plot windows.
You want to maximize the Yield of a reaction. You have 4 factors, but a full experiment (
- Factor A: Temperature
- Factor B: Pressure
- Factor C: Concentration
- Factor D: Stirring Rate
- Go to Analysis > Design of Experiments (DoE) > Fractional Factorial (FrF2).
- Number of Runs: Set to
8. - Number of Factors: Set to
4(This implies factors A, B, C, D). - Generators: Leave this empty (FrF2 will automatically select the best resolution IV design, likely
D = ABC). - Replications:
1. - Center Points:
0. - Random Seed: You can leave it as
12345or change it. - Simulation: Check "Add Simulated Response" to create a dummy "Yield" column automatically. Keep "Response Name" as
Yield. - Save Design as: Enter
my_frf2_design. - Click Submit.
- Expected Output: A summary of the design (e.g., factors, levels, generators) will appear in the output window.
my_frf2_designwill appear in your RKWard workspace.
- Expected Output: A summary of the design (e.g., factors, levels, generators) will appear in the output window.
- Go to Analysis > Design of Experiments (DoE) > Analyze Design.
- Design Object: Select
my_frf2_designfrom the list. - Response Variable: Drag the
Yieldcolumn (expandmy_frf2_designif needed) into this field. - Plots to Print: Check both "Print Main Effects Plot" and "Print Interaction Plot".
- Preview:
- Select Main Effects in the radio button.
- Observe the preview window: You should see the main effects for factors A, B, C, D.
- Switch the radio button to Interaction to see the interaction matrix plot (if applicable for the 2-level design).
- Click Submit.
- Expected Output: An ANOVA table, a Main Effects Plot, and an Interaction Plot matrix (generated by
FrF2::IAPlot) will appear in separate RKWard plot windows.
- Expected Output: An ANOVA table, a Main Effects Plot, and an Interaction Plot matrix (generated by
- "Model not created" in Preview: Ensure you have selected a valid Design Object and a Response Variable. The preview requires valid data to calculate the linear model.
- Selecting Columns: RKWard's variable selector treats dataframes as single objects by default. You must expand the tree (click the arrow next to the dataframe name) to select individual columns like
Yield. - Interaction Plots for General Designs: For designs with factors having more than two levels,
FrF2::IAPlotis not applicable. The plugin will automatically fall back to generating separate pairwise interaction plots using base R'sinteraction.plot().
Alfonso Cano
Benemérita Universidad Autónoma de Puebla
License: GPL (>= 3)
This plugin was developed with the assistance of Gemini, a large language model by Google.