% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/TFaov.R
\name{aov_tf}
\alias{aov_tf}
\title{Two-Factor ANOVA for Agricultural Experimental Designs}
\usage{
aov_tf(
  data,
  design = c("FCRD", "FRBD", "SPLIT", "STRIP"),
  factor_A,
  factor_B,
  replication = NULL,
  responsevar = "all",
  test = c("lsd", "tukey", "duncan"),
  transform = NULL,
  narc = 1,
  alpha = 0.05
)
}
\arguments{
\item{data}{A data frame containing experimental data.}

\item{design}{Type of design "FCRD", "FRBD", "SPLIT" or "STRIP".}

\item{factor_A}{Name of Factor A column in the dataset.}

\item{factor_B}{Name of Factor B column in the dataset.}

\item{replication}{Name of replication/block column (required for FRBD, SPLIT, STRIP).}

\item{responsevar}{Specific variables c("v1" ,"v2", "v3") or "all".}

\item{test}{Mean comparison test. Options include"lsd", "tukey", or "duncan".}

\item{transform}{List or character specifying transformations ("log", "sqrt", "arcsine").}

\item{narc}{Numeric or list specifying denominator for arcsine transformation.}

\item{alpha}{Significance level (default 0.05).}
}
\value{
A list containing:
\describe{
\item{Individual outputs}{
Analysis results for each response variable separately.
}
\item{Summary statistics}{
Arithmetic mean, standard deviation, minimum, and maximum values for each variable.
}
\item{Shapiro-Wilk test}{
Results of the Shapiro-Wilk test for normality.
}
\item{ANOVA and mean comparison}{
ANOVA table along with mean comparison based on the selected test for each response variable.
}
\item{Combined table}{
A summary table -two way including mean ± SD, grouping letters, SEm, SEd, CD, and CV values for all variables.
}
}#'
}
\description{
Performs analysis of variance for two-factor experiments
Factorial CRD (FCRD), Factorial RBD (FRBD), Split-Plot, and Strip-Plot designs.
}
\examples{
#Rice dataset with Factor A as TRT and Factor B as SPACE and replications in "BLOCK" column
data("Gnutdataset")
"head(Ricedataset)"

#Example: Factorial CRD
out <- aov_tf(
  Ricedataset,
  design = "FCRD",
  factor_A = "TRT",
  factor_B = "SPACE",
  replication = "BLOCK",
  responsevar = "all",
  test = "lsd",
  transform = NULL,
  narc = 1,
  alpha = 0.05
)

#Example: Split-plot with transformation
out2 <- aov_tf(
  Ricedataset,
  design = "SPLIT",
  factor_A = "TRT",
  factor_B = "SPACE",
  replication = "BLOCK",
  responsevar = "all",
  test = "lsd",
  transform = list(GPP = "log", Disease = "arcsine"),
  narc = list(Disease = 5),
  alpha = 0.05
)

out2$PH
out2$GPP

}
