deround.z.density.adjust: Draw derounded z assuming missing digits of mu and sigma are...

Description Usage Arguments

View source: R/deround_zda.R

Description

Draw derounded z assuming missing digits of mu and sigma are uniformly distributed, but adjust for estimated density of z using rejection sampling

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
deround.z.density.adjust(
  z.pdf,
  mu,
  sigma,
  mu.dec = pmax(num.deci(mu), num.deci(sigma)),
  sigma.dec = mu.dec,
  max.rejection.rounds = 10000,
  verbose = TRUE,
  just.uniform = rep(FALSE, length(mu)),
  z.min = 0,
  z.max = 5
)

Arguments

z.pdf

An estimated density of the derounded z-statistics (e.g. using only observations with many significant digits) normalized such that its highest values is 1. Best use make.z.pdf to create such a normalized pdf from a vector of observed z-statistics.

mu

Reported coefficient, possibly rounded

sigma

Reported standard error, possibly rounded.

mu.dec

Number of decimal places mu is reported to. Usually, we would assume that mu and sigma are rounded to the same number of decimal places. Since trailing zeros may not be detected, we set the default mu.dec=pmax(num.deci(mu),num.deci(sigma)).

sigma.dec

By default equal to mu.dec.

max.rejection.rounds

A limit how often the rejection sampler redraws to avoid an infinite loop.

verbose

If TRUE cat an r for each resampling draw to see how the function progresses.


skranz/RoundingMatters documentation built on Dec. 23, 2021, 3:23 a.m.