Description Usage Arguments Details Value See Also
The fit_model function is a generic function meant for internal use in
the ICPSurv package, and as such it is not exported to the namespace.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | fit_model(method, Y, X, subset, ...)
## Default S3 method:
fit_model(method, Y, X, subset = NULL, ...)
## S3 method for class 'lm'
fit_model(method, Y, X, subset = NULL, ...)
## S3 method for class 'glm'
fit_model(method, Y, X, subset = NULL, ...)
## S3 method for class 'ph'
fit_model(method, Y, X, subset = NULL, ...)
## S3 method for class 'ah'
fit_model(method, Y, X, subset = NULL, ...)
## S3 method for class 'hazard'
fit_model(method, Y, X, subset = NULL, ...)
fit_nonparam_model(method, Y, X, subset, ...)
## Default S3 method:
fit_nonparam_model(method, Y, X, subset = NULL, ...)
## S3 method for class 'ph'
fit_nonparam_model(method, Y, X, subset = NULL, id = NULL, ...)
## S3 method for class 'ah'
fit_nonparam_model(method, Y, X, subset = NULL, id = NULL, ...)
|
method |
a method object created by the
|
Y |
a vector or |
X |
a matrix, vector or data frame describing the covariates. |
subset |
an optional vector specifying a subset of observations to be used in the fitting process. |
... |
additional arguments to be passed to lower level functions. |
id |
for timevarying covariates the variable must associate each record with the id of a subject. |
The fit_model.X and fit_nonparam_model.X functions are internal
fitter functions. They are usually all quite simple as their main
functionality apart from fitting the model is ensureing that the output
is compatible with the plausible_predictor_tests.
All fit_model methods must return the following:
coefficients The estimated regression coefficients.
deviance The deviance of the fitted model, i.e. -2 log(likelihood)
df Degrees of freedom in fitted model.
scale Scale.
All fit_nonparam_model methods must return the following:
cum Cumulative regression coefficient.
cum.var Cumulative variance of regression effects.
Morover if n.sim in the method is non-zero then the
fit_nonparam_model also returnes the following
sup Kolmogorov–Smirnov test.
int Cramér–von Mises test.
Both the fit_model and fit_nonparam_model methods return a list.
fit_model methods must return the following:
|
The estimated regression coefficients. |
|
The deviance of the fitted model, i.e. -2 log(likelihood) |
|
Degrees of freedom in fitted model. |
|
Scale. |
fit_nonparam_model methods return the following:
|
Cumulative regression coefficient. |
|
Cumulative variance of regression effects. |
|
Kolmogorov–Smirnov test (only returned if |
|
Cramér–von Mises test (only returned if |
ICP, plausible_predictor_test for the
full wrapper functions.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.