How should we define the user interface for future/more flexible versions of lme4
?
What are the advantages of the all-in-one formula (i.e. formula=y~x+(1|g)
rather than formula=y~x, random=~1|g
)?
findbars()/nobars()
) and stored the pieces separately, that would be a natural precursor to allowing flexibility in the interface (i.e, where users could use either interface style.nlme
and lme4
interfaces are different, BMB doesn't feel like people have a particularly hard time with "oh, these are all supposed to be in the same formula" -- the hard part is figuring the distinction between an effect (i.e. LHS of the bar) and a grouping variable, the difference between single and multiple RE, the way that constructing a model matrix from the effect doesn't always work the way you think it should (e.g. the dummy()
function)MCMCglmm
: this may look very similar to the AS-REML interface. BMB finds MCMCglmm somewhat confusing, but maybe the problem lack of familiarity.data.frame
to allow additional things (probably as attributes? could this be done with a list?)d(x|g,iid=TRUE)
vs. d(x|g,iid=FALSE)
(equivalently just d(x|g)
to specify a diagonal model with homogeneous vs. heterogeneous variance is debatable; MCMCglmm
uses idh()
vs idv()
(I think) for the same distinction. However, the additional arguments become essential for use cases like specifying variables and functions with which to compute distances.lme
already has mature structures for specifying correlations, heteroscedasticity, and variance-covariance model structures. How much of them should we (re-) use?
lots of fairly sophisticated code inside lme for computing Cholesky and inverse-Cholesky factors; we could use this code
Perhaps, if we decide to use a different structure, we could write a wrapper that converts corStruct
s to our preferred structure??
local()
, but I think this will be considerably harder for average users)family()
-- allow a generic sort of constructor for correlation classes (but try not to make weird arbitrary-seeming design choices ...)corStruct.skeleton
to provide a starting point, but I think this will be achieved by an appropriate corFamily()
(or whatever) function: with no arguments specified (i.e. all defaults), it would return something like a list of functions that would do the appropriate processing for a traditional unstructured ((x|g)
) random effect. Structures like AR1, compound symmetry, would be special cases: roughly speaking, ar1
would be to corFamily()
as binomial
is to family()
. We might instead treat corFamily()
as a constructor of class objects rather than functions, but the key point is that the objects thus constructed should be as transparent as possible!isNested
, if possible!)Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.