I am dealing with a unreplicated factorial design. I have some illustrative examples but I need to simulate some unreplicated factorial designs. I do not how and what to use. Can $R$ handle this?
For example, I would like to analyse a $2^{4}$ factorial design (factors are A, B, C and D) with only one run and 15 contrasts. I have a single column for response. I would like to compare some methods in the literature to see which method detects active effects better. Thus, I set the active effects to have the same magnitude of $1.5\sigma$ and I would like to generate $100$ response vectors using errors that are i.i.d. with $\mathcal N(0 ,1)$. My true model has four active effects and I would like to simulate $100$ response vectors using this true model $y=3+1.5A+1.5B+1.5C+1.5BC$. But I do not know how to generate data like this using R.
Thanks gung for your reply. I just wrote a simple code before I saw your answer here. I think, I need to build up a bit more R knowledge. Anyway, here it is:
For the analysis of unreplicated factorial designs with $k$ factors and $p=2^{k}-1$ factorial effects (the main effects and interactions), the following model is generally used
\begin{equation} y=\sum\limits_{i=0}^{p}x_{i}\beta_{i}+\varepsilon_{i} \end{equation}
So, Firstly I introduced my sign table for $2^{4}$ and $\beta$ coefficients of so-called active effects.
Sign table consists of rows (runs) and columns (contrasts with general mean).
And then, I created my regression equation with magnitudes of active effects and zeros of remaining inactive effects. My simulated model, for example, was $y=3+1.5A+1.5B+1.5C+1.5BC$.
And then, I run the code below
x=read.csv("sign2.txt", header=TRUE)
sign= as.matrix(x)
is.matrix(sign)
y=read.csv("beta2.txt", header=TRUE)
beta= as.matrix(y)
is.matrix(beta)
signt=t(sign)
bs=t(beta %*% signt)
epsilon=matrix( rnorm(16*1,mean=0,sd=1), 16, 1)
response=bs+epsilon
However, unfortunately, it's for one simulation. I will put a loop command to run the simulation n-times.