Skip to contents

Extracts weights from model objects. The weights are re-scaled to up to the total number of observations in the fitting procedure.

Usage

# S4 method for class 'EL'
weights(object, ...)

Arguments

object

An object that inherits from EL.

...

Further arguments passed to methods.

Value

A numeric vector of the re-scaled weights.

References

Glenn N, Zhao Y (2007). “Weighted Empirical Likelihood Estimates and Their Robustness Properties.” Computational Statistics & Data Analysis, 51(10), 5130–5141. doi:10.1016/j.csda.2006.07.032 .

See also

Examples

data("airquality")
x <- airquality$Wind
w <- airquality$Day
fit <- el_mean(x, par = 10, weights = w)
weights(fit)
#>   [1] 0.06327543 0.12655087 0.18982630 0.25310174 0.31637717 0.37965261
#>   [7] 0.44292804 0.50620347 0.56947891 0.63275434 0.69602978 0.75930521
#>  [13] 0.82258065 0.88585608 0.94913151 1.01240695 1.07568238 1.13895782
#>  [19] 1.20223325 1.26550868 1.32878412 1.39205955 1.45533499 1.51861042
#>  [25] 1.58188586 1.64516129 1.70843672 1.77171216 1.83498759 1.89826303
#>  [31] 1.96153846 0.06327543 0.12655087 0.18982630 0.25310174 0.31637717
#>  [37] 0.37965261 0.44292804 0.50620347 0.56947891 0.63275434 0.69602978
#>  [43] 0.75930521 0.82258065 0.88585608 0.94913151 1.01240695 1.07568238
#>  [49] 1.13895782 1.20223325 1.26550868 1.32878412 1.39205955 1.45533499
#>  [55] 1.51861042 1.58188586 1.64516129 1.70843672 1.77171216 1.83498759
#>  [61] 1.89826303 0.06327543 0.12655087 0.18982630 0.25310174 0.31637717
#>  [67] 0.37965261 0.44292804 0.50620347 0.56947891 0.63275434 0.69602978
#>  [73] 0.75930521 0.82258065 0.88585608 0.94913151 1.01240695 1.07568238
#>  [79] 1.13895782 1.20223325 1.26550868 1.32878412 1.39205955 1.45533499
#>  [85] 1.51861042 1.58188586 1.64516129 1.70843672 1.77171216 1.83498759
#>  [91] 1.89826303 1.96153846 0.06327543 0.12655087 0.18982630 0.25310174
#>  [97] 0.31637717 0.37965261 0.44292804 0.50620347 0.56947891 0.63275434
#> [103] 0.69602978 0.75930521 0.82258065 0.88585608 0.94913151 1.01240695
#> [109] 1.07568238 1.13895782 1.20223325 1.26550868 1.32878412 1.39205955
#> [115] 1.45533499 1.51861042 1.58188586 1.64516129 1.70843672 1.77171216
#> [121] 1.83498759 1.89826303 1.96153846 0.06327543 0.12655087 0.18982630
#> [127] 0.25310174 0.31637717 0.37965261 0.44292804 0.50620347 0.56947891
#> [133] 0.63275434 0.69602978 0.75930521 0.82258065 0.88585608 0.94913151
#> [139] 1.01240695 1.07568238 1.13895782 1.20223325 1.26550868 1.32878412
#> [145] 1.39205955 1.45533499 1.51861042 1.58188586 1.64516129 1.70843672
#> [151] 1.77171216 1.83498759 1.89826303