Hi everyone,
I met some errors when trying to run a gsem model for 5 simultaneous equations with random coefficients for each individuals.
The panel data has around 25 independent variables (including continuous variables, categorical variables, and factors). One of the IV has around 7000 dummies. I allowed for random coefficients for 3 main IVs. There are around 40,000 observations.
The command that I used is similar as below:
gsem (DV1 <-IV1 IV2 IV3...i.IV24 i.IV25 c.IV1#M1[ID] c.IV2#M1[ID] c.IV3#M1[ID]) ///
gsem (DV2 <-IV1 IV2 ...i.IV24 c.IV1#M1[ID] c.IV2#M1[ID] c.IV3#M1[ID]) ///
gsem (DV3 <-IV1 IV2 ...i.IV24 c.IV1#M1[ID] c.IV2#M1[ID] c.IV3#M1[ID]) ///
gsem (DV4 <-IV1 IV2 ...i.IV24 c.IV1#M1[ID] c.IV2#M1[ID] c.IV3#M1[ID]) ///
gsem (DV5 <-IV1 IV2 ...i.IV24 c.IV1#M1[ID] c.IV2#M1[ID] c.IV3#M1[ID]), ///
covstruct(e.DV1 e.DV2 e.DV3 e.DV4 e.DV5, unstructured)
There are no latent variables in my model but I want to allow for heterogeneous effect on the main variables for each individual, that's why I added c.IV1#M1[ID] c.IV2#M1[ID] c.IV3#M1[ID] in the model.
However, when I tried the code, I met some errors.
First, when I run the entire model, I got errors like this:

Then I dropped c.IV3#M1[ID] and tried again, this time i got errors like below:

I wonder if anyone knows why this happened and how to fix these errors.
Thank you!
I met some errors when trying to run a gsem model for 5 simultaneous equations with random coefficients for each individuals.
The panel data has around 25 independent variables (including continuous variables, categorical variables, and factors). One of the IV has around 7000 dummies. I allowed for random coefficients for 3 main IVs. There are around 40,000 observations.
The command that I used is similar as below:
gsem (DV1 <-IV1 IV2 IV3...i.IV24 i.IV25 c.IV1#M1[ID] c.IV2#M1[ID] c.IV3#M1[ID]) ///
gsem (DV2 <-IV1 IV2 ...i.IV24 c.IV1#M1[ID] c.IV2#M1[ID] c.IV3#M1[ID]) ///
gsem (DV3 <-IV1 IV2 ...i.IV24 c.IV1#M1[ID] c.IV2#M1[ID] c.IV3#M1[ID]) ///
gsem (DV4 <-IV1 IV2 ...i.IV24 c.IV1#M1[ID] c.IV2#M1[ID] c.IV3#M1[ID]) ///
gsem (DV5 <-IV1 IV2 ...i.IV24 c.IV1#M1[ID] c.IV2#M1[ID] c.IV3#M1[ID]), ///
covstruct(e.DV1 e.DV2 e.DV3 e.DV4 e.DV5, unstructured)
There are no latent variables in my model but I want to allow for heterogeneous effect on the main variables for each individual, that's why I added c.IV1#M1[ID] c.IV2#M1[ID] c.IV3#M1[ID] in the model.
However, when I tried the code, I met some errors.
First, when I run the entire model, I got errors like this:
Then I dropped c.IV3#M1[ID] and tried again, this time i got errors like below:
I wonder if anyone knows why this happened and how to fix these errors.
Thank you!
Comment