stability_ann_sim: RRR via stability approach.

Description Usage Arguments Value Examples

View source: R/stability_ann_sim.R

Description

The model is described in the introductioon.

Usage

1
stability_ann_sim(response, X, lambda, subset = 0.7, ntimes = 50)

Arguments

lambda

the path of lambda.

subset

the proportion of subset from all samples.

ntimes

the number of subsamples.

responce

the responce matrix.

Value

a list of coefficient matrix and stabilities and lambda.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
library(SC19074)
n = 76 # samples
q = 88 # number of response variables
rho = 0.5 # correlation between Xs
rX = 10 # rank of X
r = 5 # rank of C
p = 46 # number of explanatory variables
sim21 <- rrr.sim6(n, p, q, r, b = 0.5, rho, rX)
sim_ann21 <- rrr2(sim21$Y, sim21$X, penaltySVD = "ann",modstr = list(gamma = 2))
sim_res21 <- stability_ann_sim(sim21$Y, sim21$X, sim_ann21$lambda, subset = 0.7, ntimes = 100)

## End(Not run)

wangq326/SC19074 documentation built on Jan. 2, 2020, 8:48 p.m.