% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getPCEInflation.R
\name{getPCEInflation}
\alias{getPCEInflation}
\title{Load and Process Personal Consumption Expenditures (PCE) Inflation Data}
\usage{
getPCEInflation(frequency = "M", NIPA_data = NULL)
}
\arguments{
\item{frequency}{Character string indicating the frequency of the data.
Defaults to \code{"M"} (monthly).}

\item{NIPA_data}{Optional data frame. If provided, it will be used as the raw NIPA dataset
instead of loading fresh data with \code{getNIPAFiles()}.'}
}
\value{
A \code{tbl_df} (data frame) containing the PCE data with calculated variables.
}
\description{
Downloads and processes BEA NIPA data to compute Personal Consumption Expenditures
(PCE) price indices with weights and growth measures. This is the Federal Reserve's
preferred inflation measure.
}
\details{
The function performs the following steps:
\enumerate{
\item Loads NIPA data using \code{\link{getNIPAFiles}} (or uses pre-loaded data).
\item Extracts total PCE from table \code{"U20405"} (series code \code{"DPCERC"}).
\item Computes PCE component weights as the nominal consumption share
(component value divided by total PCE).
\item Extracts quantity indices from table \code{"U20403"}.
\item Loads price indices from table \code{"U20404"}, joins weights and quantities,
and calculates period-over-period growth measures.
}
}
\examples{
\dontrun{
  # Load monthly PCE data
  pce_data <- getPCEInflation("M")
}

}
