sim.Kernelheaping: Simulation of heaping correction method

Description Usage Arguments Value Examples

View source: R/functions.R

Description

Simulation of heaping correction method

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
sim.Kernelheaping(
  simRuns,
  n,
  distribution,
  rounds,
  thresholds,
  downbias = 0.5,
  setBias = FALSE,
  Beta = 0,
  unequal = FALSE,
  burnin = 5,
  samples = 10,
  bw = "nrd0",
  offset = 0,
  boundary = FALSE,
  adjust = 1,
  ...
)

Arguments

simRuns

number of simulations runs

n

sample size

distribution

name of the distribution where random sampling is available, e.g. "norm"

rounds

rounding values, numeric vector of length >=1

thresholds

rounding thresholds

downbias

Bias parameter used in the simulation

setBias

if TRUE a rounding Bias parameter is estimated. For values above 0.5, the respondents are more prone to round down, while for values < 0.5 they are more likely to round up

Beta

Parameter of the probit model for rounding probabilities used in simulation

unequal

if TRUE a probit model is fitted for the rounding probabilities with log(true value) as regressor

burnin

burn-in sample size

samples

sampling iteration size

bw

bandwidth selector method, defaults to "nrd0" see density for more options

offset

location shift parameter used simulation in simulation

boundary

TRUE for positive only data (no positive density for negative values)

adjust

as in density, the user can multiply the bandwidth by a certain factor such that bw=adjust*bw

...

additional attributes handed over to createSim.Kernelheaping

Value

List of estimation results

Examples

1
2
3
## Not run: Sims1 <- sim.Kernelheaping(simRuns=2, n=500, distribution="norm",
rounds=c(1,10,100), thresholds=c(0.3,0.4,0.3), sd=100)
## End(Not run)

Kernelheaping documentation built on Jan. 27, 2022, 1:09 a.m.