| ParamRegrModel | R Documentation |
This is the abstract base class for parametric regression model objects like NormalGLM.
Parametric regression models are built around the following key tasks:
A method fit() to fit the model to given data, i.e. compute the MLE
for the model parameters
Methods f_yx(), F_yx() and mean_yx() to evaluate the conditional
density, distribution and regression function
A method sample_yx() to generate a random sample of response variables
following the model given a vector of covariates
set_params()Set the value of the model parameters used as default for the class functions.
ParamRegrModel$set_params(params)
paramsmodel parameters to use as default
The modified object (self), allowing for method chaining.
get_params()Returns the value of the model parameters used as default for the class functions.
ParamRegrModel$get_params()
model parameters used as default
fit()Calculates the maximum likelihood estimator for the model parameters based on given data.
ParamRegrModel$fit(data, params_init = private$params, loglik = loglik_xy)
datalist containing the data to fit the model to
params_initinitial value of the model parameters to use for the optimization (defaults to the fitted parameter values)
loglikfunction(data, model, params) defaults to loglik_xy()
MLE of the model parameters for the given data, same shape as
params_init
f_yx()Evaluates the conditional density function.
ParamRegrModel$f_yx(t, x, params = private$params)
tvalue(s) at which the conditional density shall be evaluated
xvector of covariates
paramsmodel parameters to use, defaults to the fitted parameter values
value(s) of the conditional density function, same shape as t
F_yx()Evaluates the conditional distribution function.
ParamRegrModel$F_yx(t, x, params = private$params)
tvalue(s) at which the conditional distribution shall be evaluated
xvector of covariates
paramsmodel parameters to use, defaults to the fitted parameter values
value(s) of the conditional distribution function, same shape as
t
F1_yx()Evaluates the conditional quantile function.
ParamRegrModel$F1_yx(t, x, params = private$params)
tvalue(s) at which the conditional quantile function shall be evaluated
xvector of covariates
paramsmodel parameters to use, defaults to the fitted parameter values
value(s) of the conditional quantile function, same shape as
t
sample_yx()Generates a new sample of response variables with the same conditional distribution.
ParamRegrModel$sample_yx(x, params = private$params)
xvector of covariates
paramsmodel parameters to use, defaults to the fitted parameter values
vector of sampled response variables, same length as x
mean_yx()Evaluates the regression function or in other terms the expected value of Y given X=x.
ParamRegrModel$mean_yx(x, params = private$params)
xvector of covariates
paramsmodel parameters to use, defaults to the fitted parameter values
value of the regression function
clone()The objects of this class are cloneable with this method.
ParamRegrModel$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.