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!