How can I incorporate spatially correlated data into linear mixed effect model which is fitlmematrix method I am trying to use?
3 ビュー (過去 30 日間)
古いコメントを表示
lme = fitlmematrix(X,y,Z,G,'CovariancePattern','isotrophic','FitMethod','REML')
Here the covariance pattern is for random effect as much as I know. But I want to incorporate spatially correlated data into the model where my error variance would be ~N(0,R). Here R may b Gaussian Correlation function. The model fitlme assumed that error~N(0,sigma^2). So how can I incorporate Gaussian correlation function as error variance matrix here?
0 件のコメント
採用された回答
Gautam Pendse
2018 年 2 月 6 日
Hi Mithun,
One way to approach this problem would be to use fitrgp but with a kernel function that combines Z and R. So if your model is y = X*beta + Z*b + epsilon, you could define Z*b + epsilon as a combined error term with covariance function Z*D*Z' + R which can be coded as a custom kernel function.
I am attaching an example that illustrates this using D = sigmaB^2*I and R as the squared exponential covariance.
Hope this helps,
Gautam
その他の回答 (1 件)
Bernhard Suhm
2018 年 1 月 26 日
The covariance matrix of the response in a linear mixed effects model has 2 components – a random effects component ( sigma^2)*sum_i{ Z_i*D_i*Z_i’} and an error component (sigma^2)*R, where D_i and R are typically block diagonal. These two components can compete in the sense that the same overall covariance can result from a complex random effects component + a simpler error component or a simpler random effects component + a complex error component. In fitlmematrix and fitlme, correlation between groups and observations is modelled by specifying Z_i and D_i whereas R is assumed to be the identity matrix. Depending on the structure of R, the same model could be obtained by selecting appropriate Z_i and D_i. Can you say more about the structure of R in the model? An alternative to modeling spatially correlated data would be to use Gaussian processes (see function fitrgp).
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Gaussian Process Regression についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!