getRobustWeightsSingle | R Documentation |

Compute aggregated (SmCCA) canonical weights for single omics data with quantitative phenotype (subampling enabled).

```
getRobustWeightsSingle(
X1,
Trait,
Lambda1,
s1 = 0.7,
SubsamplingNum = 1000,
trace = FALSE
)
```

`X1` |
An |

`Trait` |
An |

`Lambda1` |
LASSO penalty parameter for |

`s1` |
Proportion of features in |

`SubsamplingNum` |
Number of feature subsamples. Default is 1000. Larger number leads to more accurate results, but at a higher computational cost. |

`trace` |
Whether to display the CCA algorithm trace, default is set to FALSE. |

A canonical correlation weight matrix with `p_1`

rows. Each
column is the canonical correlation weights based on subsampled `X1`

features. The number of columns is `SubsamplingNum`

.

```
## For illustration, we only subsample 5 times.
set.seed(123)
# Single Omics SmCCA
W1 <- getRobustWeightsSingle(X1, Trait = Y, Lambda1 = 0.05,
s1 = 0.7,
SubsamplingNum = 5, trace = FALSE)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.