smooth_CIV: CIV_smooth solution with cross-validation.(recommended)

Description Usage Arguments Value Examples

View source: R/CIVMR_function.R

Description

This function first find the optimal value of λ according to projected prediction error with cross-validation. Then for a given λ value multiple intial points are used to explore potentially multiple modes.

Usage

1
2
3
smooth_CIV(G, X, Z, Y, lambda_list = NULL, k_folds = 10, sigma_min = 0.01,
  sigma_up = 0.5, stepsize = 0.1, conv_iters = 5, stepsize_last = 1e-04,
  last_conv_iters = 2000, method_lambda = "er", n_IV = 100)

Arguments

initial:

the initial value for updating u.

G:

SNP matrix with dimension n \times p.

X:

phenotype of interest.

Z:

pleiotropic phenotype Z.

Y:

the disease outcome Y.

lambda_list:

a list of values for regularization parameter lambda. A default list will be chosen if not provided.

k_folds:

number of folds for cross-validation (to find optimum λ). default = 10.

n_IV:

the number of initial points chosen to explore potential multiple modes. The converged solutions will be screened to delete redundant solutions. So the final solutions will be less or equal to n_IV. default = 100.

sigma_min:

the minimum value of σ (corresponding to the closeast approximation of L_0 penalty). default = 0.01.

sigma_up:

the moving down multiplier. σ_{j+1} = sigma_up \times σ_{j}. default = 0.5.

stepsize:

the stepsize to move solution u. default = 0.1.

conv_iters:

the maximum steps to allow updating when a converged solution is found. default =5.

stepsize_last:

When a converged solution is found with stepsize, we update this solution with a smaller stepsize to achive a more precise local maximum solution. default = 0.0001.

last_conv_iters:

the maximum iterations to run in the stage of “refining" optimum solution. default = 2000.

......:

default values for other tuning parameters.

Value

opt_lambda: the chosen optimum value of λ corresponding to the minimum projected prediction error (see paper).

IV_mat: the final matrix of CIV instruments with respect to the opt_lambda. Each column is a new instrument.

u_mat: the final CIV solutions of u with respect to the opt_lambda. Each column is a converged solution.

G_pred_error_list: the projected prediction error according to the list values of λ.

Pred_error_list: the prediction error according to the list values of λ.

Examples

1
2
3
4
5
6
7
data(simulation)
G <- simulation$G
X <- simulation$X
Z <- simulation$Z
Y <- simulation$Y
smooth.opt <- smooth_CIV( G,X,Z,Y, k_folds = 10)
plot(smooth.opt$u_mat[,1])  #plot a solution u.

LaiJiang/CIVMR documentation built on July 16, 2020, 12:45 a.m.