# \donttest{
require(gkwreg)
require(gkwdist)
data(CarTask)
# Example 1: Task effects on probability judgments
# Do people judge probabilities differently for car vs. salesperson?
fit_kw <- gkwreg(
probability ~ task,
data = CarTask,
family = "kw"
)
summary(fit_kw)
# Interpretation:
# - Alpha: Task type affects mean probability estimate
# Salesperson condition (1/4 = 0.25) vs. car type (unclear baseline)
# Example 2: Individual differences model
# Need for Closure/Certainty may moderate probability judgments
fit_kw_nfcc <- gkwreg(
probability ~ task * NFCCscale |
task,
data = CarTask,
family = "kw"
)
summary(fit_kw_nfcc)
# Interpretation:
# - Interaction: NFCC may have different effects depending on task
# People high in need for certainty may respond differently to
# explicit partitions (4 salespersons) vs. implicit partitions (car types)
# - Beta: Precision varies by task type
# Example 3: Exponentiated Kumaraswamy for extreme estimates
# Some participants may give very extreme probability estimates
fit_ekw <- gkwreg(
probability ~ task * NFCCscale | # alpha
task | # beta
task, # lambda: extremity differs by task
data = CarTask,
family = "ekw"
)
summary(fit_ekw)
# Interpretation:
# - Lambda varies by task: Salesperson condition (explicit partition)
# may produce more extreme estimates (closer to 0 or 1)
# Visualization: Probability by task and NFCC
plot(probability ~ NFCCscale,
data = CarTask,
col = c("blue", "red")[task], pch = 19,
xlab = "Need for Closure/Certainty", ylab = "Probability Estimate",
main = "Car Task: Individual Differences in Probability Judgment"
)
legend("topright",
legend = levels(CarTask$task),
col = c("blue", "red"), pch = 19
)
# Distribution comparison
boxplot(probability ~ task,
data = CarTask,
xlab = "Task Condition", ylab = "Probability Estimate",
main = "Partition Priming Effects",
col = c("lightblue", "lightcoral")
)
abline(h = 0.25, lty = 2, col = "gray")
text(1.5, 0.27, "Uniform (1/4)", col = "gray")
# }
Run the code above in your browser using DataLab