make_grid: Make probability grid

make_pgridR Documentation

Make probability grid

Description

Functions for creating a probability grid using different method make_pgrid uses beta-distribution method make_tgrid uses tiered linear method

Usage

make_pgrid(n = 50L, s = 2L, trim = TRUE)

make_tgrid(n = 50L, tier = 3L, tail = 0.25)

Arguments

n

integer length of the grid. Default is 50

s

beta distribution shape parameter, passed to both shape1 and shape2 of pbeta(). For uniform grid choose 1. Default is 2.

trim

logical, should the 0 and 1 (tails of the grid) be trimmed. Default is TRUE

tier

integer number of tiers in the linear grid. Each tier contains tail share of the previous tier. Default is 3.

tail

real number representing share of grid in each tier. Default is 0.25

Value

probability grid vector of length n

Examples

make_pgrid(100)
make_pgrid(100, 1, FALSE) #uniform grid including 0 and 1
make_tgrid(100,3,0.1)

dmi3kno/qpd documentation built on Sept. 29, 2024, 6:39 p.m.