fit.loess {bdpopt} | R Documentation |
Fit a local polynomial regression function to the estimated expected utility values
obtained through simulation via JAGS by calling
eval.on.grid
. This is a generic function for S3 objects.
fit.loess(model, span = 0.75, degree = 2)
model |
A model object obtained as the return value from |
span |
A parameter which controls the degree of smoothing. |
degree |
The degree of the polynomials to be used, normally 1 or 2. |
This function calls loess
in package stats to perform a
regression. Note that the number of decision variables must be
between 1 and 4, since this is the range supported by loess
.
The formula passed as formula
to loess
has the form
"y ~ x1 + x2"
(for two decision variables, and correspondingly
for any other number between 1 and 4). The span
and
degree
arguments are passed on to loess
as
given. Further, surface = "direct"
is used as a loess
control value in order to allow for extrapolation for the fitted
function. For the remaining arguments of loess
, the default values are used.
A new simulation model object constructed from the object given as the
first argument and the local polynomial regression results. The updated components in
the new object are model$regression.fun
and
model$gpr.hyper.params
(set to NA
). See sim.model
for a
description of these components.
Sebastian Jobjörnsson jobjorns@chalmers.se