Skip to contents

utility - what variable is the weight used to aggregate this variable as a weighted mean?

Usage

calcweight(varnames)

Arguments

varnames

vector like names_d

Value

vector same length as varnames, like c("pop", "povknownratio", "hhlds")

Examples

 x = names_these
 cbind(indicator = x, calctype = calctype(x), calcweight = calcweight(x))
#>       indicator          calctype  calcweight      
#>  [1,] "Demog.Index"      "wtdmean" "pop"           
#>  [2,] "Demog.Index.Supp" "wtdmean" "pop"           
#>  [3,] "pctlowinc"        "wtdmean" "povknownratio" 
#>  [4,] "pctlingiso"       "wtdmean" "hhlds"         
#>  [5,] "pctunemployed"    "wtdmean" "unemployedbase"
#>  [6,] "pctlths"          "wtdmean" "age25up"       
#>  [7,] "pctunder5"        "wtdmean" "pop"           
#>  [8,] "pctover64"        "wtdmean" "pop"           
#>  [9,] "pctmin"           "wtdmean" "pop"           
#> [10,] "pcthisp"          "wtdmean" "pop"           
#> [11,] "pctnhba"          "wtdmean" "pop"           
#> [12,] "pctnhaa"          "wtdmean" "pop"           
#> [13,] "pctnhaiana"       "wtdmean" "pop"           
#> [14,] "pctnhnhpia"       "wtdmean" "pop"           
#> [15,] "pctnhotheralone"  "wtdmean" "pop"           
#> [16,] "pctnhmulti"       "wtdmean" "pop"           
#> [17,] "pctnhwa"          "wtdmean" "pop"           
#> [18,] "pm"               "wtdmean" "pop"           
#> [19,] "o3"               "wtdmean" "pop"           
#> [20,] "no2"              "wtdmean" "pop"           
#> [21,] "dpm"              "wtdmean" "pop"           
#> [22,] "rsei"             "wtdmean" "pop"           
#> [23,] "traffic.score"    "wtdmean" "pop"           
#> [24,] "pctpre1960"       "wtdmean" "builtunits"    
#> [25,] "proximity.npl"    "wtdmean" "pop"           
#> [26,] "proximity.rmp"    "wtdmean" "pop"           
#> [27,] "proximity.tsdf"   "wtdmean" "pop"           
#> [28,] "ust"              "wtdmean" "pop"           
#> [29,] "proximity.npdes"  "wtdmean" "pop"           
#> [30,] "drinking"         "wtdmean" "pop"