cstar computes the minimum actionable effect size under a kinked linear loss function with user-specified degree of risk aversion.

1 | ```
cstar(regobject, r)
``` |

`regobject` |
Results from a run of a linear regression model, e.g. from the lm() command. |

`r` |
The degree of loss aversion; must be a non-negative number. This parameter maps to gamma in Esarey and Danneman (2014). |

A vector of expected values for the utility of acting on the evidence encapsulated by the betas and standard errors of the estimated regression, given the researcher's stated level of loss aversion.

Esarey and Danneman (2014). A Quantitative Method for Substantive Robustness Assessment. Political Science Research and Methods.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ```
# generate synthetic OLS data
x <- rnorm(50)
error <- rnorm(50)
y <- 1 + 1.5*x + error
# estimate model
OLSmodel <- lm(y~x)
# obtain expected utility of acting on validity of beta,
# conditional on a loss-aversion factor of 2
cstar(OLSmodel, 2)
# examine the sensitivity to choice of loss-aversion factor
loss_aversion_values <- c(1, 2, 3, 4)
eu <- NULL
for(i in loss_aversion_values){
eu <- c(eu, cstar(OLSmodel, i)[2])
}
plot(loss_aversion_values, eu)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.