Giter Site home page Giter Site logo

Comments (2)

Hua-Zhou avatar Hua-Zhou commented on August 16, 2024

@fboehm, there is a chance you can just feed the transpose of your data into functions and read off the estimates.

In your model, Y is n x d, X is nd x pd, B is pd x 1, Sigma1, Sigma2 are n x n, and V1, V2 are d x d. You assume
vec(Y) ~ N(XB, Sigma1 \otimes V1 + \Sigma2 \otimes V2).
Let Kdn be the nd x nd commutation matrix
https://en.wikipedia.org/wiki/Commutation_matrix
Then
vec(Y') = Knd vec(Y) ~ N(Knd X B, Knd (Sigma1 \otimes V1 + Sigma2 \otimes V2) Knd') = N(Knd X B, V1 \otimes Sigma1 + V2 \otimes Sigma2).

So feeding the transformed data Y', Knd X, Sigma1, Sigma2 into functions, you may read off the estimates of V1, V2 directly. The catch is current functions assume the mean structure vec(XB). Is there any structure in your X matrix? Or if the primary interest is estimating V1, V2, you can use REML: first obtain residuals from ordinary least squares then fit the variance component model using just residuals. If none of these apply, it's also straightforward modify current functions to accommodate your X.

from variancecomponentmodels.jl.

fboehm avatar fboehm commented on August 16, 2024

Thanks, @Hua-Zhou! Your explanation is very helpful. I think that I can proceed based on your detailed reply. Thanks again!

from variancecomponentmodels.jl.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.