wdd_harm | R Documentation |
Combines multiple weighted displacement difference tests into one final weighted harm metric.
wdd_harm(est, se, weight, alpha = 0.1, silent = FALSE)
est |
vector with WDD estimates (e.g. difference in crime counts for treated vs controls) |
se |
vector with standard errors for WDD estimates |
weight |
vector with weights to aggregate results |
alpha |
scaler alpha level for confidence interval (default |
silent |
boolean, do not print stat messages (default |
This test combines multiple wdd estimates with different weights. Created to combine tests for crime harm weights.
A length 5 vector with names:
HarmEst
, the combined harm estimate
SE_HarmEst
its standard error
Z
, the Z-score
and the lower and upper confidence intervals, LowCI
and HighCI
, for whatever alpha level you specified.
wdd()
for estimating the individual wdd outcomes
# Creating wdd tests for three different crimes and combining rob <- wdd(c(20,20),c(20,10)) burg <- wdd(c(30,30),c(25,20)) theft <- wdd(c(80,60),c(70,20)) dat = data.frame(rbind(rob,burg,theft)) # passing those columns now to the wdd_harm function harm_weights <- c(10,5,1) wdd_harm(dat$Est_Local,dat$SE_Local,harm_weights)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.