Hello,

I am running a mediation model where I plan to use two latent variables as mediators. For preliminary analysis I want to show how these latent variables are related to my predictor/outcome (both continuous) (e.g. through a simple regression), but I am unsure how to do this.

The code for one of the latent variables is

I tried to generate a factor score for a latent variable to use in a regression, by using 'predict latent' but I get the following output:

Is there a different way to do this or something I am missing?

Thanks

I am running a mediation model where I plan to use two latent variables as mediators. For preliminary analysis I want to show how these latent variables are related to my predictor/outcome (both continuous) (e.g. through a simple regression), but I am unsure how to do this.

The code for one of the latent variables is

sem (ypb8002 ypb8003 ypb8006 ypb8007 ypb8000 ypb8001 ypb8004 ypb8005 ypb8052 ypb8053 ypb8056 ypb8057 ypb8050 ypb8051 ypb8054 ypb8055<-Self), latent(Self) method(mlmv) stand cov(e.ypb8000*e.ypb8001 e.ypb8000*e.ypb8002 e.ypb8000*e.ypb8003 e.ypb8000*e.ypb8050 e.ypb8000*e.ypb8051 e.ypb8001*e.ypb8002 e.ypb8001*e.ypb8004 e.ypb8001*e.ypb8005 e.ypb8001*e.ypb8051 e.ypb8001*e.ypb8052 e.ypb8001*e.ypb8054 e.ypb8002*e.ypb8003 e.ypb8002*e.ypb8004 e.ypb8002*e.ypb8005 e.ypb8002*e.ypb8006 e.ypb8002*e.ypb8007 e.ypb8002*e.ypb8051 e.ypb8002*e.ypb8052 e.ypb8002*e.ypb8053 e.ypb8002*e.ypb8054 e.ypb8002*e.ypb8055 e.ypb8002*e.ypb8056 e.ypb8003*e.ypb8053 e.ypb8004*e.ypb8005 e.ypb8004*e.ypb8006 e.ypb8004*e.ypb8007 e.ypb8004*e.ypb8051 e.ypb8004*e.ypb8052 e.ypb8004*e.ypb8054 e.ypb8004*e.ypb8055 e.ypb8004*e.ypb8056 e.ypb8004*e.ypb8057 e.ypb8005*e.ypb8006 e.ypb8005*e.ypb8007 e.ypb8005*e.ypb8052 e.ypb8005*e.ypb8054 e.ypb8005*e.ypb8055 e.ypb8005*e.ypb8056 e.ypb8005*e.ypb8057 e.ypb8006*e.ypb8007 e.ypb8006*e.ypb8052 e.ypb8006*e.ypb8054 e.ypb8006*e.ypb8055 e.ypb8006*e.ypb8056 e.ypb8006*e.ypb8057 e.ypb8007*e.ypb8052 e.ypb8007*e.ypb8053 e.ypb8007*e.ypb8054 e.ypb8007*e.ypb8055 e.ypb8007*e.ypb8056 e.ypb8007*e.ypb8057 e.ypb8050*e.ypb8051 e.ypb8051*e.ypb8052 e.ypb8051*e.ypb8054 e.ypb8051*e.ypb8055 e.ypb8052*e.ypb8053 e.ypb8052*e.ypb8054 e.ypb8052*e.ypb8055 e.ypb8052*e.ypb8056 e.ypb8052*e.ypb8057 e.ypb8053*e.ypb8054 e.ypb8053*e.ypb8055 e.ypb8053*e.ypb8056 e.ypb8053*e.ypb8057 e.ypb8054*e.ypb8055 e.ypb8054*e.ypb8056 e.ypb8054*e.ypb8057 e.ypb8055*e.ypb8056 e.ypb8055*e.ypb8057 e.ypb8056*e.ypb8057)

. predict latent

output:

(xb(ypb8002 ypb8003 ypb8006 ypb8007 ypb8000 ypb8001 ypb8004 ypb8005 ypb8052 ypb8053 ypb8056 ypb8057 ypb8050 ypb8051

ypb8054 ypb8055) assumed)

too few variables specified

output:

(xb(ypb8002 ypb8003 ypb8006 ypb8007 ypb8000 ypb8001 ypb8004 ypb8005 ypb8052 ypb8053 ypb8056 ypb8057 ypb8050 ypb8051

ypb8054 ypb8055) assumed)

too few variables specified

Thanks

## Comment