The following is a SAS PROC CALIS program that can be used to obtain the parameter estimate for a quadratic structural Y=gam0 + gam1 f1 + gam2 f1^2 + d, where Y is observed and f1 is an unobserved latent variable. The measurement model for f1 has four observable indicators x1-x4.
PROC CALIS METHOD=ml COV DATA=A ;
var y x1 x2 x3 x4 x1x1 x2x2 x3x3 x4x4 x1x2 x1x3 x1x4 x2x3 x2x4 x3x4;
LINEQS
x1 = F1 + E1,
x2 = B21 F1 + E2,
x3 = B31 F1 + E3,
x4 = B41 F1 + E4,
x1x1 = F1F1 + F3 + E5,
x2x2 = B62 F1F1 + F4 + E6,
x3x3 = B72 F1F1 + F5 + E7,
x4x4 = B82 F1F1 + F6 + E8,
x1x2 = B92 F1F1 + E9,
x1x3 = B102 F1F1 + E10,
x1x4 = B112 F1F1 + E11,
x2x3 = B122 F1F1 + E12,
x2x4 = B132 F1F1 + E13,
x3x4 = B142 F1F1 + E14,
y = GAM1star F1 + GAM2 F1F1 + D1;
STD
E1-E14 = TH1-TH14,
D1=ZETA,
F1=PH1, F1F1=PH1PH1,
F3-F6 = PSI3-PSI6;
COV
F3 E9 = TH39, F3 E10 = TH310, F3 E11 = TH311,
E9 E10 = TH910, E9 E11 = TH911, E9 E12 = TH912, E9 E13 = TH913,
E11 E14 = TH1114, E12 E13 = TH1213, E12 E14 = TH1214, E13 E14 = TH1314;
BOUNDS
/* CONSTRAINTS */
B62 = B21*B21; B72 = B31*B31; B82 = B41*B41;
PSI3 = 4*PH1*TH1; PSI4 = 4*B21*B21*PH1*TH2; PSI5 = 4*B31*B31*PH1*TH3;
TH9=B21*B21*PH1*TH1+ PH1*TH2 + TH1*TH2;
TH39 = 2*PH1*TH1*B21; TH310 = 2*PH1*TH1*B31; TH311 = 2*PH1*TH1*B41;
TH910 = B21*B31*PH1*TH1; TH911 = B21*B41*PH1*TH1; TH912 = B31*PH1*TH2;
RUN;
/*Save the sample mean of X1 as meanX1 and the sample mean of Y as meanY
Then we obtain GAM0 and GAM1 by the following*/
data gammas; set save;
F1 F1F1 = PH3,
/*The above five parameters are the result of third order
moments and will be left free to be estimated*/
F4 E9 = TH49, F4 E12 = TH412, F4 E13 = TH413,
F5 E10 = TH510, F5 E12 = TH512, F5 E14 = TH514,
F6 E11 = TH611, F6 E13 = TH613, F6 E14 = TH614,
E10 E11 = TH1011, E10 E12 = TH1012, E10 E14 = TH1014, E11 E13 = TH1113,
0<=PH1, 0<=ZETA,
0<=TH1-TH8;
B92 = B21; B102 = B31; B112 = B41;
B122 = B21*B31; B132 = B21*B41; B142 = B31*B41;
PSI6 = 4*b41*b41*ph1*th4;
TH10= B31*B31*PH1*TH1+PH1*TH3+TH1*TH3;
TH12= B31*B31*PH1*TH2+B21*B21*PH1*TH3 + TH3*TH2;
TH11 = B41*B41*PH1*TH1+ PH1*TH4 + TH1*TH4;
TH13 = B21*B21*PH1*TH4+ B41*B41*PH1*TH2 + TH2*TH4;
TH14 = B31*B31*PH1*TH4+ B41*B41*PH1*TH3 + TH3*TH4;
TH49 = 2*PH1*TH2*B21; TH412 = 2*B21*B31*PH1*TH2; TH413 = 2*PH1*TH2*B41*B21;
TH510 = 2*B31*PH1*TH3; TH512 = 2*B21*B31*PH1*TH3; TH514 = 2*B31*B41*PH1*TH3;
TH611 = 2*PH1*B41*TH4; TH613 = 2*B41*B21*PH1*TH4; TH614 = 2*B41*B31*PH1*TH4;
TH913 = B41*PH1*TH2; TH1011=B31*B41*PH1*TH1; TH1012= B21*PH1*TH3;
TH1014=B41*PH1*TH3; TH1213 = B31*B41*PH1*TH2; TH1214= B21*B41*PH1*TH3;
TH1113=B21*PH1*TH4; TH1114=B31*PH1*TH4; TH1314=B21*B31*PH1*TH4;
Save PH1, GAM1star, and GAM2 from the output of the above program
GAM0 = -PH1*GAM2 + meanY - GAM1star*meanX1 + GAM2*meanX1**2;
GAM1 = GAM1star - 2*meanX1*GAM2;