The lvglasso algorithm to estimate network structures containing latent variables, as proposed by Yuan (2012). Uses the glasso package (Friedman, Hastie and Tibshirani, 2014) and mimics input and output of the `glasso`

function.

1 | ```
lvglasso(S, nLatents, rho = 0, thr = 1e-04, maxit = 10000, lambda)
``` |

`S` |
Sample variance-covariance matrix |

`nLatents` |
Number of latent variables. |

`rho` |
The LASSO tuning parameter |

`thr` |
The threshold to use for convergence |

`maxit` |
Maximum number of iterations |

`lambda` |
The lambda argument containing factor loadings, only used for starting values! |

A list of class `lvglasso`

containing the following elements:

`w` |
The estimated variance-covariance matrix of both observed and latent variables |

`wi` |
The estimated inverse variance-covariance matrix of both observed and latent variables |

`pcor` |
Estimated partial correlation matrix of both observed and latent variables |

`observed` |
Logical vector indicating which elements of w, wi and pcor are observed |

`niter` |
The number of iterations used |

`lambda` |
The estimated lambda matrix, when result is transformed to EFA model |

`theta` |
The estimated theta matrix |

`omega_theta` |
The estimated omega_theta matrix |

`psi` |
The estimated psi matrix |

Sacha Epskamp <mail@sachaepskamp.com>

Yuan, M. (2012). Discussion: Latent variable graphical model selection via convex optimization.The Annals of Statistics,40, 1968-1972.

Jerome Friedman, Trevor Hastie and Rob Tibshirani (2014). glasso: Graphical lasso-estimation of Gaussian graphical models. R package version 1.8. http://CRAN.R-project.org/package=glasso

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

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.