# Fake post [TESTS]

Let us suppose that we want to generate a single random variable according to a CRD with two quantitative factors with levels 0, 5, 10, 15 and 2, 4, 6, 8 respectively, being 2 replicates. Then we can denote YijkYijk as being the random variable observed in the k-th experimental unit (k = 1, 2) that received the i-th level of factor X1 (i = 1,2,3,4) and j-th level of factor X2 (j = 1,2,3,4). In these cases, we should note that there is only one intercept. Therefore, such an intercept must appear in the first factor to be declared. In the others, the value of the intercept must be declared as 0 (only to compute the length of the vector correctly). Therefore, consider the following values for the first factor: β0=1,β1=3,β2=0,β3=0β0=1,β1=3,β2=0,β3=0. For the second factor we have: β4=2,β5=0,β6=0β4=2,β5=0,β6=0. Matrically we have:

Using the gexp package we have:

level <- seq(0, 15, 5)
cont_crd <- matrix(c(level,
level^2,
level^3),
ncol=3)

crd_l <- gexp(mu        = NULL,
r         = 3,
err       = matrix(rep(0,12),
nrow = 12),
fe        = list(f1 = c(2, 3, 0, 0)),
contrasts = list(f1 = cont_crd))

summary(crd_l)
#> Database
#>     X1 r Y1
#> 1  x11 1  2
#> 2  x12 1 17
#> 3  x13 1 32
#> 4  x14 1 47
#> 5  x11 2  2
#> 6  x12 2 17
#> 7  x13 2 32
#> 8  x14 2 47
#> 9  x11 3  2
#> 10 x12 3 17
#> 11 x13 3 32
#> 12 x14 3 47

Below the simulation chart.