Skip to contents

Estimate Margins

Usage

estimate_margins(dta, margins_controls, kde = NULL)

Arguments

dta

data.table
Data to calculate the margins.

margins_controls

list
A list with arguments to be passed to kde1d::kde1d(). Currently, there can be

  • mult numeric vector of length one or d; all bandwidths for marginal kernel density estimation are multiplied with mult. Defaults to log(1 + d) where d is the number of climate variables.

  • xmin numeric vector of length d; see kde1d::kde1d().

  • xmax numeric vector of length d; see kde1d::kde1d().

  • bw numeric vector of length d; see kde1d::kde1d().

  • deg numeric vector of length one or d; kde1d::kde1d().

  • type character vector of length one or d; must be one of c, cont, continuous for continuous variables, one of d, disc, discrete for discrete integer variables, or one of zi, zinfl, zero-inflated for zero-inflated variables.

kde

list
kernel density estimations.

Value

A data frame with the marginal PIT.