Toy data generation

Likelihood functions for the implemented models.

1 | ```
pfa.neg.log.likelihood(Wvec, phi, X)
``` |

`Wvec` |
Parameter vector which is converted in the latent covariance structure used in PFA, correspond to W*t(W) in the model X = Wz + epsilon. |

`phi` |
Marginal covariance in the model X = Wz + epilon with epsilon ~ N(0, phi). |

`X` |
Data: features x samples matrix. |

Other likelihood functions will be added later.

Log-likelihood of the data, given the model parameters.

Leo Lahti leo.lahti@iki.fi

See citation("dmt").

fit.dependency.model, pfa

1 2 3 4 5 6 7 8 9 10 11 12 13 | ```
library(dmt)
# Generate toydata
N <- 100
xdim <- 10
zdim <- 3
toy <- generate.toydata(N = N, zDim = zdim, xDim = xdim, yDim = xdim, marginal.covariances = "diagonal")
# Estimate model parameters
res <- pfa(toy$X, zDimension = zdim)
W <- res@W$total
phi <- res@phi$total
# wtw <- crossprod(t(W)) # is the same as W * t(W)
# Calculate negative log-likelihood for the model
L <- pfa.neg.log.likelihood(W, phi,toy$X)
``` |

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.