imputeSE: Impute missing standard errors

Description Usage Arguments Value

View source: R/imputese.R

Description

Impute missing standard errors by country based on other standard errors in that country. Imputed value is assumed to be the maximum standard error observed in that country multiplied by a specificed factor. If all standard errors within a country are missing, a pre-specified value can be imputed.

Usage

1
2
imputeSE(d, iso.column, data.column, se.column, transform.se.column = NULL,
  mult.factor = 1.5, impute.value = 0.025, transform.impute.value = 0.1)

Arguments

d

a dataframe that contains country codes/names, data column and standard error column

iso.column

string specifying name of column which contains country codes/names

data.column

string specifying name of column which contains observations

se.column

string specifying name of column which contains standard errors

transform.se.column

string specifying name of column which contains standard errors of transformed variable, if using

mult.factor

multiplication factor to multiply the maximum observed standard error

impute.value

value of standard error to impute if no information available in country.

transform.impute.value

value of transformed standard error to impute if no information available in country.

Value

A data frame of final standard error values and a column indicating whether the standard error value was imputed.


MJAlexander/distortr documentation built on July 17, 2020, 4:06 p.m.