spm_con_1d_g {stpm} | R Documentation |
Fitting a 1-D genetic SPM model with constant parameters
Description
This function implements a continuous genetic SPM model by assuming all the parameters are constants.
Usage
spm_con_1d_g(
spm_data,
gene_data,
a = NA,
b = NA,
q = NA,
f = NA,
f1 = NA,
mu0 = NA,
theta = NA,
effect = c("a"),
lower = c(),
upper = c(),
control = list(xtol_rel = 1e-06),
global = FALSE,
verbose = TRUE,
ahessian = FALSE,
method = "lbfgs",
method.hessian = "L-BFGS-B"
)
Arguments
spm_data |
A dataset for the SPM model. See the STPM pacakge for more details about the format. |
gene_data |
A two column dataset containing the genotypes for the individuals in spm_data.
The first column |
a |
The initial value for the paramter |
b |
The initial value for the paramter |
q |
The initial value for the paramter |
f |
The initial value for the paramter |
f1 |
The initial value for the paramter |
mu0 |
The initial value for the paramter |
theta |
The initial value for the paramter |
effect |
A character vector of the parameters that are linked to genotypes.
The vector can contain any combination of |
lower |
A vector of the lower bound of the parameters. |
upper |
A vector of the upper bound of the parameters. |
control |
A list of the control parameters for the optimization paramters. |
global |
A logical variable indicating whether the MLSL (TRUE) or the L-BFGS (FALSE) algorithm is used for the optimization. |
verbose |
A logical variable indicating whether initial information is printed. |
ahessian |
A logical variable indicating whether the approximate (FALSE) or analytical (TRUE) Hessian is returned. |
method |
Optimization method.
Can be one of the following: lbfgs, mlsl, mma, slsqp, tnewton, varmetric.
Default: |
method.hessian |
Optimization method for hessian calculation (if ahessian=F).
Default: |
Value
est The estimates of the parameters.
hessian The Hessian matrix of the estimates.
hessian The Hessian matrix of the estimates.
lik The minus log-likelihood.
con A number indicating the convergence. See the 'nloptr' package for more details.
message Extra message about the convergence. See the 'nloptr' package for more details.
beta The coefficients of the genetic effect on the parameters to be linked to genotypes.
References
He, L., Zhbannikov, I., Arbeev, K. G., Yashin, A. I., and Kulminski, A.M., 2017. Genetic stochastic process model for detecting pleiotropic and interaction effects with longitudinal data.
Examples
## Not run:
library(stpm)
data(ex_spmcon1dg)
res <- spm_con_1d_g(ex_data$spm_data, ex_data$gene_data,
a = -0.02, b=0.2, q=0.01, f=3, f1=3, mu0=0.01, theta=1e-05,
upper=c(-0.01,3,0.1,10,10,0.1,1e-05), lower=c(-1,0.01,0.00001,1,1,0.001,1e-05),
effect=c('q'))
## End(Not run)