wdd_harm {ptools} | R Documentation |
Combines Multiple WDD Tests
Description
Combines multiple weighted displacement difference tests into one final weighted harm metric.
Usage
wdd_harm(est, se, weight, alpha = 0.1, silent = FALSE)
Arguments
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 |
Details
This test combines multiple wdd estimates with different weights. Created to combine tests for crime harm weights.
Value
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
andHighCI
, for whatever alpha level you specified.
See Also
wdd()
for estimating the individual wdd outcomes
Examples
# 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)
[Package ptools version 2.0.0 Index]