Closed sweinand closed 1 year ago
Include the following code. Otherwise w is not defined if provided and there are duplicates for example (-> lengths will differ).
w
# compute expenditure share weights for each region: if(!is.null(q)){ pdata[, "w" := (p*z)/sum(p*z, na.rm=TRUE), by="r"] }else{ pdata[, "w" := z] }
Fixed
Include the following code. Otherwise
w
is not defined if provided and there are duplicates for example (-> lengths will differ).