I don't think your model is what you believe it to be. It is fine to have Var1 as fixed and Var2 as random. But you appear to be operating under the assumption that variables specified on the RANDOM statement are assumed to have a distribution with nonzero mean. For a model written as
Y{ij} = X{ij}*beta + gamma{i} + epsilon{ij}
where i indexes store and j indexes an observation within the i-th store, it appears that you believe that the random effect gamma{i} has distribution
gamma{i} ~ N(mu, V)
That is, it appears that you believe that there is a nonzero expectation for gamma{i} that is implicit in the model. Because you believe that there is a nonzero expectation for gamma{i}, you have specified NOINT on the MODEL statement (assuming that the random intercept would have nonzero expectation) and have not specified Var2 on the MODEL statement.
That is NOT how the MIXED procedure operates. Effects specified on the RANDOM statement are assumed to have distribution
gamma{i} ~ N(0, V)
To be even more explicit, the code which you have specified estimates the following model:
Sales{ij} = b1*Var1{ij} + theta{i} + delta{i}*Var2{ij} + epsilon{ij}
theta{i} ~ N(0, V{theta})
delta{i} ~ N(0, V{delta})
cov(theta{i},delta{i}) = rho*sqrt(V{theta}*V{delta})
If you remove the NOINT option from the MODEL statement and include both Var1 and Var2 on the MODEL statement, then you would fit what is almost certainly a better model (and definitely NOT A WRONG model) where you have
theta{i} ~ N(mu{theta}, V{theta})
delta{i} ~ N(mu{delta}, V{delta})
cov(theta{i},delta{i}) = rho*sqrt(V{theta}*V{delta})
Now, as to your original question about the MIXED procedure returning values which are different from the values which you compute, I don't see anything in the code you supplied which indicates how you constructed predicted values either from the MIXED procedure or in a data step (using parameter estimates from the MIXED procedure). You don't show either an OUTP or OUTPM option on the MODEL statement. You also don't show any ODS OUPUT statements for capturing the fixed effect estimates (ODS OUTPUT solutionF=...) or for capturing the random effect estimates (ODS OUTPUT solutionR=...).
Without seeing exactly what you requested and exactly how you computed predicted values, one can only speculate on the reason for the differences. My guess is that you requested the marginal expectation (using OUTPM=) and then constructed conditional predicted values (computing b1*Var1 + theta + delta*Var2) OR you requested the conditional predicted values (using OUTP=) and then constructed marginal predicted values (computing b1*Var1). You have to be consistent about whether you do or do not include the random effects when constructing predicted values.
Finally, I would note that your PROC MIXED code did not name your subject effect (Store_number) on a CLASS statement. That is OK if your data are sorted by Store_number. But if your data are not sorted by Store_number, then you either need to first sort by Store_number or name Store_number on a CLASS statement. To address all of the issues which I have indicated above, I would revise your model as
PROC MIXED DATA = mylib.data;
class store_number;
model sales = Var1 Var2 / solution cl outp=Preds_RE outpm=Preds_FE;
random intercept Var2 / type=un subject=Store_Number solution cl gcorr;
run;
Note that the data set Preds_RE represent predictions which include the random effects and is obtained as
Yhat = b0 + b1*Var1 + b2*Var2 + theta + delta
while Preds_FE represent predictions which include only the fixed effects:
Yhat = b0 + b1*Var1 + b2*Var2
... View more