FitGLLVM | R Documentation |
Fits a GLLVM to data
FitGLLVM(
Y,
X = NULL,
W = NULL,
nLVs = 1,
Family = "gaussian",
RowEff = "fixed",
ColEff = "fixed",
RowEffPriorsd = 100,
ColEffPriorsd = 100,
ColScorePriorsd = 10,
PriorLV = NULL,
INLAobj = FALSE,
...
)
Y |
A data frame or matrix with the response (assuming counts at the moment) |
X |
A data frame or matrix of covariates (strictly row-level covariates). Can be NULL |
W |
A data frame or matrix of column-level covariates. Can be NULL |
nLVs |
The number of latent variables required |
Family |
A string indicating the likelihood family. If length 1, it gets repeated with one for each column of the data. For supported distributions see names(inla.models()$likelihood). |
RowEff |
String indicating what sort of row effect is required. Either none, fixed or random. Defaults to fixed. |
ColEff |
String indicating what sort of column effect is required. Either none, fixed or random. Defaults to fixed. |
RowEffPriorsd |
Prior standard deviation for latent variable, defaults to 100 |
ColEffPriorsd |
Prior standard deviation for latent variable, defaults to 100 |
ColScorePriorsd |
Prior standard deviation for column scores (the betas for INLA insiders), defaults to 10 |
PriorLV |
Hyperprior for the precision of the latent variable, as a list that INLA will understand (sorry). Defaults to NULL, where the default INLA prior will be used |
INLAobj |
Should the full INLA object be included in the output object? Defaults to |
... |
More arguments to be passed to |
This fits a GLLVM....
Priors for fixed effects can be passed straight to INLA with code like control.fixed = list(mean = ..., prec = ...)
The column effects have to be fixed effects: if you want them to be random, you have to have fixed rows. You can just transpose the matrix to get this model.
A list with fixed, rowterm, colterm, colscores, and roweffs, formula, Y, X, family. the posterior summaries for the fixed effects, row main effects, the column main effect, the column scores and the row effects respectively. rowterm and colterm may be NULL if they were not set to be random.
FitGLLVM(matrix(1:10, ncol=5), nLVs=1, Family="poisson")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.