I use proc calis create a SEM, I run the program as below but proc calis couldn't function.
ERROR: Variable V1 in the VARIANCE or STD statement is not independent.
ERROR: Variable V2 in the VARIANCE or STD statement is not independent.
how to deal this problems? thank ahead!
Hello,
I do not download attachments if not absolutely needed (and I am not the only one with that habit).
Can you post your PROC CALIS code in a reply?
When editing your reply, click on the running-man-icon" in the toolbar with tip-text "Insert SAS Code". A pop-up window appears wherein you can paste your SAS code. That way, structure and formatting of the SAS-program is preserved.
Are you dealing with the LINEQS Model or another one?
@jiltao : maybe you can answer? I am not very familiar with PROC CALIS and SEM.
Thanks,
Koen
proc calis data=HBM_CSSF_ALL1 covariance modification MAXITER=50000000;
lineqs
V1 = LV1F1*F1 + E1,
V2 = LV2F1*F1 + E2,
V5 = LV5F1*F1 + E5,
V3 = LV3F2*F2 + E3,
V4 = LV4F2*F2 + E4,
V6 = LV6F3*F3 + E6,
V7 = LV7F3*F3 + E7,
V10 = LV10F4*F4 + E10,
V11 = LV11F4*F4 + E11,
V12 = LV12F4*F4 + E12,
V13 = LV13F4*F4 + E13,
V19 = LV19F6*F6 + E19,
V21 = LV21F6*F6 + E21,
V25 = LV25F6*F6 + E25,
V26 = 1*F7 + E26
;
variance
V1-V7=VARV1-VARV7,
V10-V13=VAR10-VAR13,
V19=VARV19,
V21=VARV21,
V25=VARV25,
V26=0,
F1=1,F2=1,F3=1,F4=1,F6=1,F7=1;
cov
F1 F2 = CF1F2,
F1 F3 = CF1F3,
F1 F4 = CF1F4,
F1 F6 = CF1F6,
F1 F7 = CF1F7,
F2 F3 = CF2F3,
F2 F4 = CF2F4,
F2 F6 = CF2F6,
F2 F7 = CF2F7,
F3 F4 = CF3F4,
F3 F6 = CF3F6,
F3 F7 = CF3F7,
F4 F6 = CF4F6,
F4 F7 = CF4F7,
F6 F7 = CF6F7,
V1 V2 = CV1V2;
var v1-v7 v10-v13 v19 v21 v25 v26;
run;
As stated in the documentation here --
SAS Help Center: VARIANCE Statement
you cannot list any endogenous variables in the var-list list of the VARIANCE statement.
V's are your endogenous variables and you should not specify them in the VARIANCE statement.
Do you mean to specify the variance for the E's? You might want to replace the V's with the E's in your VARIANCE and COV statements.
Jill
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.