Description Usage Arguments Details Value Author(s) Examples

Simulate data from the latent factor model.

1 2 | ```
lfmm_sampler(n, p, K, outlier.prop, cs, sigma = 0.2, B.sd = 1, B.mean = 0,
U.sd = 1, V.sd = 1)
``` |

`n` |
number of observations. |

`p` |
number of response variables. |

`K` |
number of latent variables (factors). |

`outlier.prop` |
proportion of outlier. |

`cs` |
correlation with between X and U. |

`sigma` |
standard deviation of residual errors. |

`B.sd` |
standard deviation for the effect size (B). |

`B.mean` |
mean of B. |

`U.sd` |
standard deviations for K factors. |

`V.sd` |
standard deviations for loadings. |

`lfmm_sample()`

sample a response matrix Y and a primary variable X such that

Y = U t(V) + X t(B) + Epsilon.

U,V, B and Epsilon are simulated according to normal multivariate distributions.
Moreover U and X are such that `cor(U[,i], X) = cs[i]`

.

A list with simulated data.

kevin caye, olivier francois

1 2 3 4 5 6 7 8 9 10 | ```
dat <- lfmm_sampler(n = 100,
p = 1000,
K = 3,
outlier.prop = 0.1,
cs = c(0.8),
sigma = 0.2,
B.sd = 1.0,
B.mean = 0.0,
U.sd = 1.0,
V.sd = 1.0)
``` |

cayek/MatrixFactorizationR documentation built on Feb. 19, 2018, 2:04 p.m.

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.