\encoding{UTF-8}
\name{CCAI}
\docType{data}
\alias{CCAI}
\alias{CCAI_R}
\alias{CCAI_pattern}
\alias{CCAI_Phi}
\title{The CCAI Climate-Friendly Purchasing Choices Domain}
\description{
  Correlation matrix, factor pattern matrix, and factor intercorrelations
  for the Climate Change Action Inventory (CCAI) (Barchard et al., 2021)
  Climate-Friendly Purchasing Choices domain, analyzed in Bi and Barchard
  (2024). The scale measures the frequency with which individuals make
  purchasing choices aimed at reducing climate change. Data were collected
  from 500 United States MTurk workers. After 15 climate change deniers
  and 24 multivariate outliers were removed, 461 participants remained.
  Climate change deniers were excluded because the scale measures behaviors
  intended to reduce climate change --- including individuals who do not
  believe climate change exists would be inconsistent with the measure's
  intent.

  The Climate Change Action Inventory contains eight domains; the
  Climate-Friendly Purchasing Choices domain analyzed here is one of them.
}
\usage{
data(CCAI, package = "GPArotation")
}
\format{
  Three objects are loaded by \code{data(CCAI)}:
  \itemize{
    \item \code{CCAI_R}: a \eqn{14 \times 14}{14 x 14} numeric
      correlation matrix. Row and column names are item labels
      \code{CCAI1} through \code{CCAI14}, ordered by factor
      to match \code{CCAI_pattern}.
    \item \code{CCAI_pattern}: a \eqn{14 \times 3}{14 x 3} numeric
      matrix of factor pattern coefficients. Row names are item labels
      \code{CCAI1} through \code{CCAI14}, ordered by factor to
      facilitate interpretation. Column names are factor labels
      \code{SustainableOptions}, \code{CollectiveAction}, and
      \code{AvoidBuyingNew}.
    \item \code{CCAI_Phi}: a \eqn{3 \times 3}{3 x 3} numeric matrix
      of factor intercorrelations. Row and column names are the three
      factor labels.
  }
}
\details{
  The CCAI Climate-Friendly Purchasing Choices domain consists of 14 items.
  Items used a nine-point frequency scale ranging from 1 (less than once a
  year) to 9 (at least 14 times a week). For full details on study design,
  data collection, analysis, and interpretation see Bi and Barchard (2024).

  \code{CCAI_R} is the observed \eqn{14 \times 14}{14 x 14} correlation
  matrix for the 14 items of the Climate-Friendly Purchasing Choices domain.
  The correlation matrix was kindly provided by the authors and has not been
  published separately.

  \code{CCAI_pattern} is a \eqn{14 \times 3}{14 x 3} factor pattern matrix
  from principal components extraction followed by direct oblimin rotation,
  reported in Table 2 of Bi and Barchard (2024) (the Table is labeled
  ``Factor Structure'' in the paper but contains pattern coefficients).
  The three factors are: Choosing Sustainable Options (F1), Supporting
  Collective Action (F2), and Avoiding Buying New (F3).

  \tabular{clrrr}{
  Item   \tab Description                                           \tab F1  \tab F2  \tab F3  \cr
  CCAI8  \tab Choose products with less impact on climate change    \tab .95 \tab .00 \tab -.02 \cr
  CCAI6  \tab Choose products with less packaging                   \tab .91 \tab -.04 \tab .01 \cr
  CCAI7  \tab Choose products made locally                          \tab .89 \tab -.09 \tab .07 \cr
  CCAI11 \tab Encourage others to choose climate-friendly products  \tab .56 \tab .40 \tab .05 \cr
  CCAI12 \tab Problem solve to reduce impact of purchases           \tab .52 \tab .44 \tab .04 \cr
  CCAI10 \tab Encourage others to buy less                          \tab .41 \tab .44 \tab .12 \cr
  CCAI14 \tab Give time/money to orgs reducing purchase impact      \tab -.01 \tab .97 \tab -.02 \cr
  CCAI13 \tab Give time/money to orgs reducing purchases            \tab .02 \tab .93 \tab .01 \cr
  CCAI5  \tab Donate to charity rather than buying a gift           \tab -.02 \tab .78 \tab .20 \cr
  CCAI2  \tab Use borrowed/rented/digital rather than buying        \tab -.02 \tab -.18 \tab .90 \cr
  CCAI4  \tab Buy used rather than new                              \tab .00 \tab .15 \tab .76 \cr
  CCAI1  \tab Repair rather than buying replacements                \tab .03 \tab .06 \tab .76 \cr
  CCAI3  \tab Use borrowed/rented tools rather than buying          \tab .10 \tab .21 \tab .62 \cr
  CCAI9  \tab Donate or sell old possessions                        \tab .22 \tab .27 \tab .46 \cr
  }

  \code{CCAI_Phi} is a \eqn{3 \times 3}{3 x 3} factor intercorrelation
  matrix. All three intercorrelations exceed 0.50.

  \tabular{lrrr}{
                               \tab F1   \tab F2   \tab F3   \cr
  Choosing Sustainable Options \tab 1.00 \tab 0.59 \tab 0.59 \cr
  Supporting Collective Action \tab 0.59 \tab 1.00 \tab 0.53 \cr
  Avoiding Buying New          \tab 0.59 \tab 0.53 \tab 1.00 \cr
  }

  \subsection{The Tandem Paradigm on Correlated Data}{
    The \code{CCAI} Purchasing Choices domain illustrates the Tandem
    criteria on highly correlated factors. Because the underlying
    dimensions are strongly intercorrelated (\eqn{\phi_{ij} > 0.50}),
    \strong{TandemI} pulls shared variance into a single dominant general
    factor (approximately 59 percent of total variance), alerting the
    researcher to a unified behavioral core.

    \strong{TandemII} forces an orthogonal simple structure, but the
    90-degree constraint creates an artificial compromise when true
    dimensions are correlated --- smearing loadings across factors.
    Comparing TandemII to oblique \strong{Oblimin} using the package
    summary diagnostics (\code{calc_AUC}, \code{calc_hyperplane})
    provides empirical evidence that an oblique structure is
    conceptually superior for these data.
  }

  See \code{vignette("GPA3bifactor", package = "GPArotation")} for a
  bifactor analysis of these data.
}
\note{
  The raw data are publicly available on the Open Science Framework.
  As the data are subject to a license, users should consult the OSF
  page for terms of use before using the raw data directly:
  \url{https://osf.io/h38yb/overview}.
}
\seealso{
  \code{\link{rotations}},
  \code{\link{bifactorT}},
  \code{\link[base]{eigen}},
  \code{\link[stats]{factanal}},
  \code{\link{Harman}},
  \code{\link{Thurstone}},
  \code{\link{WansbeekMeijer}},
  \code{\link{GriffithMulaik}}  
}
\references{
  Barchard, K.A., Okagawa, K., Hoffman, C.K., and Odents, O. (2021).
  \emph{Climate Change Action Inventory.} Unpublished psychological
  test. Available from kim.barchard@unlv.edu.

  Bi, Y. and Barchard, K.A. (2024). Purchasing choices that reduce
  climate change: An exploratory factor analysis.
  \emph{Spectra Undergraduate Research Journal}, \bold{3}(2), 8--14.
  \doi{10.9741/2766-7227.1028}.
}
\examples{
  data(CCAI, package = "GPArotation")

  # Observed correlation matrix
  round(CCAI_R, 2)

  # Published pattern matrix and factor intercorrelations
  round(CCAI_pattern, 2)
  round(CCAI_Phi, 2)

  # Reproduce published analysis: PCA extraction via eigendecomposition
  # followed by oblimin rotation. No additional packages required.
  # Gives the same result as psych::principal used by Bi and Barchard (2024).
  ev          <- eigen(CCAI_R)
  k           <- 3
  L_unrotated <- ev$vectors[, 1:k] \%*\% diag(sqrt(ev$values[1:k]))
  rownames(L_unrotated) <- colnames(CCAI_R)
  res.ob <- oblimin(L_unrotated, randomStarts = 100)

  # Sort and extract loadings for comparison
  res_sorted <- GPArotation:::.sortGPALoadings(res.ob)
  L_repro    <- unclass(res_sorted$loadings)

  # Compare reproduced vs published side by side, alternating by factor
  comparison <- cbind(round(L_repro[, 1], 2), round(CCAI_pattern[, 1], 2),
                      round(L_repro[, 2], 2), round(CCAI_pattern[, 2], 2),
                      round(L_repro[, 3], 2), round(CCAI_pattern[, 3], 2))
  colnames(comparison) <- c("F1.repro", "F1.pub",
                            "F2.repro", "F2.pub",
                            "F3.repro", "F3.pub")
  print(comparison)

  # --- Tandem criteria ---
  # Stage 1: TandemI reveals factor redundancy structure.
  # One dominant general factor (SS = 8.3, 59\% variance) suggests
  # highly correlated underlying constructs.
  res.t1 <- tandemI(L_unrotated, randomStarts = 100)
  print(res.t1)

  # Stage 2: TandemII for simple structure (orthogonal constraint).
  res.t2 <- tandemII(L_unrotated, randomStarts = 100)
  summary(res.t2)

  # For heavily correlated constructs, oblique rotation achieves
  # substantially cleaner simple structure than TandemII.
  # Compare AUC and hyperplane counts across methods.
  cat("           AUC    Hyperplane\n")
  cat("TandemII  ",
      round(GPArotation:::calc_AUC(res.t2)$AUC_mean, 3), "  ",
      sum(abs(unclass(res.t2$loadings)) < 0.1), "loadings\n")
  cat("Oblimin   ",
      round(GPArotation:::calc_AUC(res.ob)$AUC_mean, 3), "  ",
      sum(abs(unclass(res.ob$loadings)) < 0.1), "loadings\n")

  # Orthogonal bifactor rotation using MLE extraction
  fa.un <- factanal(factors = 3, covmat = CCAI_R, n.obs = 461,
                    rotation = "none")
  bif <- bifactorT(fa.un)
  print(bif, sortLoadings = FALSE, digits = 3, cutoff = 0.05)
}
\keyword{datasets}
