\name{apply_peticontrast}
\alias{apply_peticontrast}
\title{Apply PetiContrast (Sum Coding) to a Data Frame}
\usage{
apply_peticontrast(data, col_name)
}
\arguments{
\item{data}{A data.frame.}

\item{col_name}{A string specifying the column name to transform.}
}
\value{
A data.frame with the modified contrasts for the specified column.
}
\description{
This function applies a custom sum coding (effect coding) to a specified factor column
in a data frame. It is designed for OLS models where you want to compare each level
to the overall trend (mean) rather than a baseline category.
}
\examples{
df <- data.frame(Quarter = factor(c("Q1", "Q2", "Q3", "Q4", "Q1", "Q2")))
df_new <- apply_peticontrast(df, "Quarter")
contrasts(df_new$Quarter)
}
