% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lfebd3.R
\name{generate_Tn_full}
\alias{generate_Tn_full}
\title{Generate the full ternary construction matrix}
\usage{
generate_Tn_full(n)
}
\arguments{
\item{n}{Integer. Number of recursion levels (or factors).}
}
\value{
A matrix with entries in \code{0}, \code{1}, and \code{2}
  representing the full ternary construction after \code{n}
  recursive expansions.
}
\description{
Builds the full recursive ternary matrix used as the foundation for
generating complete, fractional, and confounded 3-level factorial
layouts in this script.
}
\details{
The construction starts from a single-column seed and applies the
3-by-3 recursive expansion rule `n` times. The returned matrix is
transposed so that downstream functions can extract the square design
submatrix directly.
}
\examples{
generate_Tn_full(1)
dim(generate_Tn_full(2))
get_Tn_square(1)
dim(get_Tn_square(2))
d <- lfbd(2)
d
nrow(d)
d <- lfbd.fr(2, 1)
d
attr(d, "defining_contrasts")
lfbd.cf(2, 1)
dim(lfbd.cf(3, 2))
d <- lfbd.cf.full(2, 1)
d
colnames(d)
d <- lfbd(2)
blk <- convert_to_blocks(d)
blk
d <- lfbd.cf.full(2, 1)
convert_to_blocks(d)
d <- lfbd.cf.full(2, 1)
blk <- convert_to_blocks(d)
build_block_matrix(blk)
X <- build_effect_matrix(NULL, c(3, 3))
dim(X)
head(X)
d <- lfbd.cf.full(2, 1)
blk <- convert_to_blocks(d)
res <- FactChar(c(3, 3), blk)
print(res)
res <- lfbd_analyze(
  type = "lfbd.cf.full",
  factor_levels = c(3, 3),
  n = 2,
  r = 1,
  show_design = FALSE,
  run_analysis = FALSE
)
names(res)

}
\references{
Elsawah, A.M. Multiple doubling: a simple effective construction
technique for optimal two-level experimental designs. \emph{Statistical
Papers} \strong{62}, 2923--2967 (2021).
DOI: 10.1007/s00362-020-01221-0

Gupta, S. C. (1983).
Some new methods for constructing block designs having orthogonal factorial structure.
Journal of the Royal Statistical Society, Series B (Methodological), 45, 297-307.
}
\seealso{
[get_Tn_square()], [lfbd()], [lfbd.fr()], [lfbd.cf()]
}
