% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hmetad.R
\name{joint_response}
\alias{joint_response}
\alias{type1_response}
\alias{type2_response}
\title{Convert between separate and joint type 1/type 2 responses}
\usage{
joint_response(response, confidence, K)

type1_response(joint_response, K)

type2_response(joint_response, K)
}
\arguments{
\item{response}{A type 1 response (\code{0} or \code{1})}

\item{confidence}{A type 2 response/confidence rating (in \code{1:K})}

\item{K}{The number of confidence levels}

\item{joint_response}{A joint type 1/type 2 response}
}
\value{
A joint response (for \code{joint_response}), type 1 response (for
\code{type1_response}), or type 2 response (for \code{type2_response})
}
\description{
Confidence ratings and decisions are collected in one of two
ways.
\itemize{
\item For separate ratings, there will be a type 1 response (\eqn{R \in \{0, 1\}}) and a
type 2 response (\eqn{C \in [1, K]}).
\item For joint ratings, there is instead a combined type 1/type 2 response
(\eqn{J \in [1, 2K]}), with values in \eqn{[1, K]} indicating a type 1
response of \eqn{0} and values in \eqn{[K+1, 2K]} indicating a type 1
response of \eqn{1}, with confident responses at the ends of the scale.
}

\code{joint_response} converts separate type 1 and type 2 responses into the joint
format

\code{type1_response} and \code{type2_response} convert the joint response into
separate responses.
}
\examples{
# convert joint_response to separate responses
joint <- 1:8
K <- 4
type1_response(joint, K)
type2_response(joint, K)

# convert separate responses to a joint response
t1 <- rep(c(0, 1), each = 4)
t2 <- c(4:1, 1:4)
joint_response(t1, t2, K)

}
