Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a following stochastic model describing evolution of a process ($Y$) in space and time. Ds and Dt are domain in space (2D with $x$ and $y$ axes) and time (1D with $t$ axis). This model is usually known as mixed-effects model or components-of-variation models

enter image description here

I am currently developing Y as follow:

%# Time parameters
T=1:1:20; % input

%# Grid and model parameters

[Grid.Nx,Grid.Ny,Grid.Nt] = meshgrid(1:1:nCol,1:1:nRow,T);


deterministic_mu = detConstant.*(((Grid.Nt).^tPower)./((Grid.Nx).^xPower));

beta_s = randn(nRow,nCol); % mean-zero random effect representing location specific variability common to all times

gammaTemp = randn(nT,1);

for t = 1:nT
    gamma_t(:,:,t) = repmat(gammaTemp(t),nRow,nCol); % mean-zero random effect representing time specific variability common to all locations

var=0.1;% noise has variance = 0.1
for t=1:nT
    kappa_st(:,:,t) = sqrt(var)*randn(nRow,nCol);

for t=1:nT
    Y(:,:,t) = deterministic_mu(:,:,t) + beta_s + gamma_t(:,:,t) + kappa_st(:,:,t);

Can someone help explain, through some illustration using Matlab, if I am correctly producing $Y$? Also, how to produce delta in the expression for $Y$?

share|improve this question

Not 100% sure, but it seems that the delta is iid noise, like an ordinary residual, and kappa is likely to be correlated over space and time. In terms of parameters, delta would just have one (variance), and kappa would have at least two (variance + correlation).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.