Is this another type of Randomized Complete Block Design?
It is very closely related but this seems to be a Latin Square design, not a RCB design, though we could say that it's an extension of the RCB design. If we look at a table of the two blocking factors and see which treatment (materials) are applied, we obtain this:
/* Remove response column, as we don't want the response variable in the table */
PROC SQL;
CREATE TABLE dt_selected AS
SELECT * EXCEPT WEAR
FROM dt;
QUIT;
PROC TRANSPOSE DATA=dt_selected OUT=dt_wide;
BY run; /* ID variable /
ID sur; / Time variable /
VAR mat; / Variables to transpose /
PREFIX=mat_; / Prefix for new columns
RUN;
which results in:
run mat_1 mat_2 mat_3 mat_4
1 B D A C
2 D B C A
3 A C B D
4 C A D B
This shows each run as a row, and each column contains the treatments (mat) for that run, and is labelled mat_X where X is the surface used for that run. Notice that the columns appear to be randomised, as per the RCB design, that is, each in column (blocking factor run), each treatment (mat = A, B, C or D) appears exactly once. But in addition, in each row (blocking factor sur, the treatments also appear exactly once. That is one of the defining characteristics of a Latin Square (another characteristic is that both blocking factors should have the same number of levels (in your case 4 each). This is in contrast to the RCB design where the rows do not necessarily have every treatment exactly once (1 or more treatments can appear more than once, and 1 or more treatments may be absent, from the rows). A Latin Square is a design in which two gradients are controlled with crossed blocks, but in each intersection there is only one treatment level.
Model:
We can write the model as follows, where we refer to the above Latin Square layout with the runs (in rows) indexed by $j$, and the surfaces (in columns) indexed by $k$:
$$y_{ijk} = \mu + t_i + b_j + c_k + \epsilon_{ijk}$$
where:
$y_{ijk}$ is the response from the experimental unit in row $i$ (the $i$th, column $j$ of the Latin Square above, that received treatment (material) $k$
$\mu$ is the overall mean response, taken over all treatments and all blocks,
$t_i$ is the difference between $\mu$ and the mean response for treatment (material) $i$ ie, the treatment effect (which we are interested in),
$b_j$ is the difference between $\mu$ and the mean response for row $j$, ie the blocking effect of the machine runs (which we are not interested in), and
$c_k$ is the difference between $\mu$ and the mean response for column $k$, ie the blocking effect of the machine surfaces (which we are not interested in), and
$\epsilon_{ijk}$ is the residual error for the $i$th material in the $j$th run block using the $k$th surface block.
To fit such a model, in SAS we can use:
PROC GLM data=dt;
CLASS run sur mat;
MODEL wear = run sur mat;
LSMEANS mat / PDIFF=ALL ADJUST=TUKEY;
RUN;
where we instruct SAS to compute all the pairwise comparisons for the treatment effect, as per the research question with the LSMEANS statement.
Note that, as with the RCB design, if the Latin Square design had more levels of the blocking factors, then we could use a mixed effects model with crossed random effects, and such a model would be fitted with:
PROC MIXED data=dt;
CLASS run sur mat;
MODEL wear = mat;
RANDOM run sur / TYPE=VC;
LSMEANS mat / PDIFF=ALL ADJUST=TUKEY;
RUN;
where we use the TYPE=VC option (Variance Components) to specify that these random effects are additive and independent. Note that PROC MIXED also supports TYPE=CS (Compound Symmetry), UN (Unstructured) and AR(1) (Autoregressive of order 1) among others.
surandmatfactors were randomised, and what hypotheses you are interested in testing? – George Savva Nov 16 '23 at 12:01wear ~ 1 + mat + (1 | run) + (1 | sur)(using R notation) You also need to clarify your research question! – kjetil b halvorsen Nov 16 '23 at 12:08