Comments (7)
Interesting, is it correct that a spacial covariance structure essentially leads to a Gaussian Process model (with modeled mean function?) or am I off here?
from mmrm.
@kkmann I guess that is true - based on my intuition:-)
from mmrm.
proposal: instead of using cs(time|subject)
or cs(time|group/subject)
, use cs(time) + id(subject)
to indicate time
has correlations by subject, or cs(time|group) + id(subject)
to indicate time
has correlations per group
by subject, or cs(time1, time2)
to indicate numerical spatial coordinates.
with this, if we have multiple endpoints with correlations, we can also use this framework. e.g, heights and weights are somehow correlated with, for example, unstructured correlation, and for each time point, they have AR1 correlation; taking heights and weights into this model, we have something like ar1(time) + un(variable) + id(subject)
; the resulting covariance matrix is the Kronecker product of ar1 covariance matrix and unstructured covariance matrix. (we sort them internally)
from mmrm.
Interesting thanks @clarkliming ! However I would prefer for now to keep it simpler and not go into Kronecker products etc. I think we could still use syntax exp(time1, time2 | group / subject)
which looks ok ? Also if only using one time variable we can assert whether it is numeric. Basically the covariance structure decides whether we need factor or numeric for the time variable.
Would that work?
from mmrm.
There is something to it. Should probably think about a grammar of covariance structures at some point :)
From a user perspective, it is probably simpler to stick with a singe call as exp(t | id)
. I would avoid the term "spatio" completely here. That's where it comes from (Kriging), but it is very confusing in our context since the majority of intended users would use it over time, not space.
The term exp
seems a bit generic and could confuse. This particular kernel is often referred to as "squared exponential" (which is not ideal either since it is more an exponentiated negative squared distance kernel...). So exp_sq(t | id)
could work. Or, if possible, gp(t | id, type = "squared exponential")
since it is the covariance structure of a Gaussian process with squared exponential kernel.
Most other covariance structures (if not all?) could be seen as inducing GPs as well, but sometimes with weird distance metrics, or over discrete spaces, which is a rather uncommon view. So I would restrict the gp
notation to continuous time covariance functions and use the established MMRM naming conventions otherwise.
The Kronecker could be the main selling point for v2.0.0 ;)
from mmrm.
@kkmann for the naming - how about "euclidean covariance structures"? since these use the euclidean space and distances for calculations. The usual cov structures would then be "ordered" in contrast, since they only use the ordered common time points.
from mmrm.
Ah, the "type" parameter might be a bit confusing. I was basically suggesting to use gp()
(as in Gaussian process) for all covariance structures defined by smooth covariance functions of continues variables. It avoids any notion of spatial or temporal. I guess we only consider stationary covariance functions of Euclidean distance, most prominently the squared exponential one. Maybe better call it gp(t | id, covariance_function = "squared exponential")
? This would make it clear that this is fundamentally different from the other "ordered" covariance structures already implmented. Technically these would be GPs on the ordered discrete set of planned visits, but I doubt that anyone but me might find that analogy helpful x)
Must say, I really love the idea to allow Kronecker products eventually @clarkliming!
While we are at it, is it standard to "add" the covariance function in the formula notation? I found that a bit weird, in mixed effects models it makes some sense to add fixed and random effect but here it is really only a notational convention, if I am not mistaken. Could also specify the covariance structure in a separate argument.
from mmrm.
Related Issues (20)
- Add a `confint` method to use t-distribution based quantiles HOT 2
- URGENT! Failed CRAN Checks: 2024-01-21 HOT 1
- mmrm bioconductor dependancy HOT 4
- test for `is_using_clang` needs to be skipped on old R versions
- fitted values in mmrm HOT 8
- URGENT! Failed CRAN Checks: 2024-01-28
- L-BFGS-B divergence however error code is not correct HOT 2
- Need to document `VISITN` and `VISITN2` in `fev_data`
- Type III tests fail for character covariates
- avoid CRAN warning
- URGENT! Failed CRAN Checks: 2024-03-10 HOT 1
- [Question] Random intercept model HOT 6
- support for `{marginaleffects}`
- Reproducibility issue: There's a discrepancy in coefficient estimates when altering the variable order within the formula. HOT 5
- predict() does not work when variables are transformed within formula HOT 2
- fix note
- Add positive definiteness check of `theta_vcov` to `h_mmrm_tmb_check_conv()`
- Change Daniel's email address
- LS estimates using spatial covariance HOT 5
- Add an application vignette HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mmrm.