View source: R/!archived/predict_tau.R View source: R/predict_tau.R
| predict_tau | R Documentation |
Uses the extrapolation method to estimate intra-respondent reliability (IRR, \tau)
when your conjoint design does not include an explicit repeated task. The input is a
projoint_data object (e.g., produced by reshape_projoint).
predict_tau(.data, .title = NULL)
.data |
A |
.title |
Optional character string used as the plot title prefix. |
The procedure constructs pairs of base tasks within respondent, computes the proportion
of identical choices as a function of how many attributes differ between the two tasks,
fits a weighted regression of agreement on the number of differing attributes, and
extrapolates to zero differences to obtain \hat{\tau}.
A projoint_tau object (list-like) with components:
$irr: a tibble with columns x (number of differing attributes) and
predicted (fitted agreement), including x = 0 which is the estimate
of \tau.
$figure: a ggplot2 object visualizing observed agreement by x
and the fitted line with the extrapolated point at x = 0.
plot.projoint_tau, summary.projoint_tau,
reshape_projoint
# Example workflow:
data(exampleData1)
outcomes <- c(paste0("choice", 1:8), "choice1_repeated_flipped")
# Even if your real study lacks a repeated task, this shows the API:
pj <- reshape_projoint(exampleData1, outcomes, .repeated = TRUE)
tau_fit <- predict_tau(pj, .title = "IRR (tau): ")
# Inspect the extrapolated tau (row where x == 0)
tau_fit$irr[tau_fit$irr$x == 0, ]
# Plot (also available via plot(tau_fit))
print(tau_fit$figure)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.