% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pcbsm.R
\name{pcbsm}
\alias{pcbsm}
\title{Compute Partial Credit Behavioral Selection Model (PCBSM) for polytomous and dichotomous items}
\usage{
pcbsm(
  df = NULL,
  items = NULL,
  grp = NULL,
  u = NULL,
  X = NULL,
  dif.items = NULL,
  type.dif = NULL,
  verbose = T,
  fit = "ucminf",
  method.theta = "eap"
)
}
\arguments{
\item{df}{data.frame containing the data}

\item{items}{vector containing the names of columns where item responses are stored in df}

\item{grp}{string containing the name of the column where the group membership variable is stored in df}

\item{u}{vector of weights to be included in the model as a covariate to account for unobserved confounding. Can be obtained from the "select_weight" function extracting response residuals from a probit model with grp as dependent variable and confounders and instruments as independent variables.}

\item{X}{vector of strings containing the name of additional adjustment variables to be included in the model}

\item{dif.items}{vector containing the list of indexes in "items" corresponding to dif items}

\item{type.dif}{vector containing DIF form for each item specified in dif.items. 1 is homogeneous DIF, 0 is heterogeneous DIF}

\item{verbose}{set to TRUE to print a detailed output, FALSE otherwise}

\item{fit}{string determining the optimization algorithm. Values "ucminf" or "nlminb" ar recommended}

\item{method.theta}{string determining the estimation method for individual latent variable values. Either "eap", "mle" or "wle"}
}
\value{
A data.frame containing various model outputs
}
\description{
This function computes a frequentist PCBSM, potentially accounting for DIF on specified items
}