View source: R/spm_time-dependent.R
spm_time_dep | R Documentation |
A function for the model with time-dependent model parameters.
spm_time_dep( x, start = list(a = -0.05, f1 = 80, Q = 2e-08, f = 80, b = 5, mu0 = 0.001), frm = list(at = "a", f1t = "f1", Qt = "Q", ft = "f", bt = "b", mu0t = "mu0"), stopifbound = FALSE, lb = NULL, ub = NULL, verbose = FALSE, opts = NULL, lrtest = FALSE )
x |
Input data table. |
start |
A list of starting parameters, default:
|
frm |
A list of formulas that define age (time) - dependency.
Default: |
stopifbound |
Estimation stops if at least one parameter
achieves lower or upper boundaries. Default: |
lb |
Lower bound of parameters under estimation. |
ub |
Upper bound of parameters under estimation. |
verbose |
Turns on verbosing output. |
opts |
A list of options for |
lrtest |
Indicates should Likelihood-Ratio test be performed.
Possible values: |
A set of estimates of a
, f1
, Q
,
f
, b
, mu0
.
status Optimization status (see documentation for nloptr package).
LogLik A logarithm likelihood.
objective A value of objective function (given by nloptr).
message A message given by nloptr
optimization function
(see documentation for nloptr package).
Yashin, A. et al (2007), Health decline, aging and mortality: how are they related? Biogerontology, 8(3), 291-302.<DOI:10.1007/s10522-006-9073-3>.
library(stpm) set.seed(123) #Data preparation: n <- 5 data <- simdata_time_dep(N=n) # Estimation: opt.par <- spm_time_dep(data) opt.par
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.