% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/type_lta.R
\name{type_lta}
\alias{type_lta}
\title{Classify LTA Traits into Hermann's Leadership Typology}
\usage{
type_lta(
  lta,
  precision_weighted = FALSE,
  need_for_power = 0.5,
  control = 0.44,
  complex_high = 0.56,
  confidence_high = 0.81,
  task = 0.59,
  distrust = 0.41,
  ingroup = 0.42
)
}
\arguments{
\item{lta}{A data frame with one row per speech, as returned by
\code{\link[=get_lta]{get_lta()}}. Must contain columns \code{Pp}, \code{B}, \code{C}, \code{Ss}, \code{Ta}, \code{D}, \code{Na}.
When \code{precision_weighted = TRUE}, must also contain \code{varPp}, \code{varB},
\code{varC}, \code{varSs}, \code{varTa}, \code{varD}, \code{varNa}.}

\item{precision_weighted}{Logical. If \code{FALSE} (default), aggregate traits
with a simple mean. If \code{TRUE}, use inverse-variance (precision) weighting
via random-effects meta-analysis (\code{metafor::rma()}).}

\item{need_for_power}{Threshold for the need-for-power trait (\code{Pp}).
Default \code{0.50}.}

\item{control}{Threshold for belief in ability to control events (\code{B}).
Default \code{0.44}.}

\item{complex_high}{Threshold for high conceptual complexity (\code{C}).
Default \code{0.56}.}

\item{confidence_high}{Threshold for high self-confidence (\code{Ss}).
Default \code{0.81}.}

\item{task}{Threshold for task orientation (\code{Ta}). Default \code{0.59}.}

\item{distrust}{Threshold for distrust (\code{D}). Default \code{0.41}.}

\item{ingroup}{Threshold for in-group bias / nationalism (\code{Na}).
Default \code{0.42}.}
}
\value{
A one-row \link[tibble:tibble]{tibble::tibble} with aggregated trait values, standard
errors (when \code{precision_weighted = TRUE}), and classification columns:
\code{constraint}, \code{openness}, \code{motivation_toward_world}, \code{task_orientation},
\code{typology}, and \code{method}.
}
\description{
Takes per-speech LTA output (from \code{\link[=get_lta]{get_lta()}}) and aggregates trait scores
across speeches, then classifies the leader along three dimensions
(constraint, openness, motivation toward world) and maps the first two plus
task orientation to one of eight leadership styles.
}
\examples{
# Simple-mean aggregation works on any data frame with the seven trait
# columns; here we use a small illustrative input.
example_lta <- data.frame(
  Pp = c(0.45, 0.52, 0.48),
  B  = c(0.40, 0.48, 0.43),
  C  = c(0.60, 0.55, 0.58),
  Ss = c(0.75, 0.82, 0.79),
  Ta = c(0.62, 0.58, 0.65),
  D  = c(0.35, 0.42, 0.38),
  Na = c(0.38, 0.45, 0.41)
)
type_lta(example_lta)

\donttest{
# Precision-weighted aggregation needs per-trait variances, which come
# from get_lta(..., bootstrap = TRUE). Requires spaCy to be installed.
spacyr::spacy_initialize()
res <- data.table::rbindlist(
  lapply(c(jfk19610120, jfk19610925, jfk19630610), function(x)
    get_lta(own_entity = "United States", text = clean_text(x),
            bootstrap = TRUE, B = 1000))
)
type_lta(res, precision_weighted = TRUE)
}
}
