Computes a continuous and smooth function according to the given utility points
compute_function_aux(
x,
y,
ids,
mode = 1,
penalty_order = 4,
lambda_max = 10000,
current_lambda = 1,
n_penalty_dimensions = 1,
ndx = 20,
deg = 6
)
a matrix or dataframe containing the certainty equivalents (x-values of utility points) for a given participant in each use case.
can be a vector or a matrix representing the corresponding utility values (y-values of utility points).
a list containing the IDs of the participants. If not given, a list with IDs from 1 to n_observations will be created.
an integer between 0, 1, 2 representing the three possible modes: multiple imputation, optimal classification or 'weak' classification. Default is optimal classification (1).
highest dimension (i.e., derivative) to penalize. Must be lower than deg.
maximum lambda used for computing the optimal lambda. It is used only in multiple imputation (mode = 0) and optimal (mode = 1). The default value is 10000.
lambda considered in the current iteration. Only used in multiple imputation (mode = 0) to create the combinations and as actual lambda value in 'weak' classification mode (mode = 2). The default value is 1.
number of dimensions to penalise. Possible values are 1 or 2. The default value is 1.
number of intervals to partition the distance between the lowest and highest x-values of the utility points.
degree of the B-spline basis. Determines the degree of the function to be estimated. If deg = 2, the estimated utility function will consist of quadratic functions.
A smooth and continuous utility function.