smooth_loess: smooth parameter grid

Description Usage Arguments Value Author(s) Examples

Description

Fits a loess regression and adds candidates scenarios within the 95 percent confidence band around the fit.

Usage

1
smooth_loess(scenarios, parameter, groups, points, drop = T, width = 6, ...)

Arguments

scenarios

list of candadidate parameter settings

parameter

parameter to smooth

groups

explanatory variable

points

number of points around each prediction

drop

should columns that start with "result" or "select" or be dropped (which may have been added by simulate_batch, or select_results)

width

width of the band around the smoothed fit in multiples of the standard error

...

additional options to stats::loess

Value

matrix of parameter settings with points times nrow(scenarios) rows

Author(s)

Florian Klinglmueller

Examples

1
2
3
4
scenarios <- expand.grid(m=seq(0,1,.1),s=seq(1,2,.1),n=100)
results <- simulate_batch(scenarios,100000,simulate_poly)
candidates <- select_results(results,'s',"result")
smooth_criminals <- smooth_loess(candidates,'m','s',10)

floatofmath/casino documentation built on May 16, 2019, 1:21 p.m.