# Wierd estimate of mean in a simple model

2 posts / 0 new
Offline
Joined: 08/18/2013 - 15:33
Wierd estimate of mean in a simple model

Dear all,

I've met a weird issue with means running a simple model.

The data:
Cov<-matrix(
c(10,3.0,6.5,
3.0,10,6.5,
6.5,6.5,10),ncol=3,nrow=3)
library('mvtnorm')
data<-as.data.frame(rmvnorm(1000,mean=rep(100,3),sigma=Cov))
names(data)<-c('X','Y','Z')

The covariance matrix corresponds the model:
X -> Z = 0.5
Y -> Z = 0.5
X <-> Y = 3
X <-> X = 10
Y <-> Y = 10
Z <-> Z = 3.5
All means are 100

The model:
aModel<-mxModel(type='RAM',name='Phenotypic model',
manifestVars=c('X','Y','Z'),
mxPath(from=c('X','Y'),to='Z',connect='single',
arrows=1,labels=c('k1','k2'),values=c(0.4,0.4)),
mxPath(from=c('X','Y','Z'),connect='single',arrows=2,
labels=c('Var_X','Var_Y','Var_Z'),values=c(9,9,3)),
mxPath(from=c('X','Y'),connect='unique.bivariate',arrows=2,values=2,
labels='R'),
mxPath(from='one',to=c('X','Y','Z'),values=95,arrows=1,free=TRUE),
mxData(observed=data,type='raw'))
aModel<-mxRun(aModel)
summary(aModel)

The estimates were following:
name matrix row col Estimate Std.Error A
1 k1 A Z X 0.4629935 0.02007053
2 k2 A Z Y 0.5220042 0.01925094
3 Var_X S X X 9.3700700 0.41902247
4 R S X Y 2.5130352 0.31841775
5 Var_Y S Y Y 10.1555406 0.45422019
6 Var_Z S Z Z 3.4772623 0.15549028
7 Phenotypic model.M[1,1] M 1 X 99.8898305 0.09679912
8 Phenotypic model.M[1,2] M 1 Y 100.0068158 0.10077470
9 Phenotypic model.M[1,3] M 1 Z 1.5826991 2.41974169

They seem to be OK except the mean of Z. Why do you think could this happen?

mxVersion()

# Default optimiser: SLSQP

Offline
Joined: 01/24/2014 - 12:15
Intercepts rather than means

The elements of matrix M should be regarded as intercepts, i.e. coefficients of regression onto a constant, and not as means per se. Compare the elements of M to the results of lm(Z~X+Y,data=data). In contrast, the model-expected mean of variable Z, from mxGetExpected(model=aModel,component="means"), should look reasonable.