Skip to content

Commit 87b91bd

Browse files
committed
Update Kappa_Stan.R
n was not defined
1 parent 0f8d639 commit 87b91bd

File tree

1 file changed

+1
-0
lines changed
  • Bayesian_Cognitive_Modeling/ParameterEstimation/DataAnalysis

1 file changed

+1
-0
lines changed

Bayesian_Cognitive_Modeling/ParameterEstimation/DataAnalysis/Kappa_Stan.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ plot(samples)
9292
samples$mean$kappa
9393

9494
# Compare to Cohen's point estimate
95+
n <- sum(y)
9596
p0 <- (y[1]+y[4])/n
9697
pe <- (((y[1]+y[2]) * (y[1]+y[3])) + ((y[2]+y[4]) * (y[3]+y[4]))) / n^2
9798
kappa.Cohen <- (p0-pe) / (1-pe)

0 commit comments

Comments
 (0)