I am a Japanese and beginner with stata so my poor English and ignorance of stata may irritate you.
Sorry about that.
What I want to know is how to deal with the fact that the latent class analysis does not work properly when using the Lanza plugin.
First, here is the do file I ran
discard
//set trace on
drop _all
cd \\icho23-home01\vol_home01\home\s2320552\Desktop\class\Rele ase64-1.3.2\
infile using classtxt
/*Example 1: LCA model */
doLCA Female Under18 o1824 Age_2534 Age_3544 Age_4554 Age_5564 Age_65 Occupation_employed Occupation_unemployed Occupation_student Occupation_pensioner Occupation_childcare Highereducation Higherincome q2_42 q2_43 q2_47 q2_49 q6_11 q6_12 q6_13 q6_14 q6_15 q6_16 q6_17 not_necessary Practical_reason Unabletouse_reason Totalban Banpavementriding q0_10 q5_2_8 q5_2_9 q5_2_10, ///
nclass(2) ///
seed(100000) ///
seeddraws(100000) ///
categories(2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 5 5 5 5) ///
criterion(0.000001) ///
rhoprior(1.0)
return list
matrix list r(gamma)
matrix list r(gammaSTD)
//matrix list r(rho)
//matrix list r(rhoSTD)
And here are the results
/*Example 1: LCA model */
. doLCA Female Under18 o1824 Age_2534 Age_3544 Age_4554 Age_5564 Age_65 Occupation_employed Occupation_unemployed Occupation_student Occupation_pensioner Occupation_childcare
> Highereducation Higherincome q2_42 q2_43 q2_47 q2_49 q6_11 q6_12 q6_13 q6_14 q6_15 q6_16 q6_17 not_necessary Practical_reason Unabletouse_reason Totalban Banpavementriding q
> 0_10 q5_2_8 q5_2_9 q5_2_10, ///
> nclass(2) ///
> seed(100000) ///
> seeddraws(100000) ///
> categories(2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 5 5 5 5) ///
> criterion(0.000001) ///
> rhoprior(1.0)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 observations deleted)
(0 observations deleted)
(0 observations deleted)
variable Female was float now byte
variable Under18 was float now byte
variable o1824 was float now byte
variable Age_2534 was float now byte
variable Age_3544 was float now byte
variable Age_4554 was float now byte
variable Age_5564 was float now byte
variable Age_65 was float now byte
variable Occupation_employed was float now byte
variable Occupation_unemployed was float now byte
variable Occupation_student was float now byte
variable Occupation_pensioner was float now byte
variable Occupation_childcare was float now byte
variable Highereducation was float now byte
variable Higherincome was float now byte
variable q2_42 was float now byte
variable q2_43 was float now byte
variable q2_47 was float now byte
variable q2_49 was float now byte
variable q6_11 was float now byte
variable q6_12 was float now byte
variable q6_13 was float now byte
variable q6_14 was float now byte
variable q6_15 was float now byte
variable q6_16 was float now byte
variable q6_17 was float now byte
variable not_necessary was float now byte
variable Practical_reason was float now byte
variable Unabletouse_reason was float now byte
variable Totalban was float now byte
variable Banpavementriding was float now byte
variable q0_10 was float now byte
variable q5_2_8 was float now byte
variable q5_2_9 was float now byte
variable q5_2_10 was float now byte
(128,625 bytes saved)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
591 contradictions in 1,225 observations
assertion is false
r(9);
end of do-file
r(9);
error message is " assertion is false r(9);"
An example of a data set is as follows
This is a bit of a mess, but I'd appreciate it if someone could help me find a solution to this problem.
Sorry about that.
What I want to know is how to deal with the fact that the latent class analysis does not work properly when using the Lanza plugin.
First, here is the do file I ran
discard
//set trace on
drop _all
cd \\icho23-home01\vol_home01\home\s2320552\Desktop\class\Rele ase64-1.3.2\
infile using classtxt
/*Example 1: LCA model */
doLCA Female Under18 o1824 Age_2534 Age_3544 Age_4554 Age_5564 Age_65 Occupation_employed Occupation_unemployed Occupation_student Occupation_pensioner Occupation_childcare Highereducation Higherincome q2_42 q2_43 q2_47 q2_49 q6_11 q6_12 q6_13 q6_14 q6_15 q6_16 q6_17 not_necessary Practical_reason Unabletouse_reason Totalban Banpavementriding q0_10 q5_2_8 q5_2_9 q5_2_10, ///
nclass(2) ///
seed(100000) ///
seeddraws(100000) ///
categories(2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 5 5 5 5) ///
criterion(0.000001) ///
rhoprior(1.0)
return list
matrix list r(gamma)
matrix list r(gammaSTD)
//matrix list r(rho)
//matrix list r(rhoSTD)
And here are the results
/*Example 1: LCA model */
. doLCA Female Under18 o1824 Age_2534 Age_3544 Age_4554 Age_5564 Age_65 Occupation_employed Occupation_unemployed Occupation_student Occupation_pensioner Occupation_childcare
> Highereducation Higherincome q2_42 q2_43 q2_47 q2_49 q6_11 q6_12 q6_13 q6_14 q6_15 q6_16 q6_17 not_necessary Practical_reason Unabletouse_reason Totalban Banpavementriding q
> 0_10 q5_2_8 q5_2_9 q5_2_10, ///
> nclass(2) ///
> seed(100000) ///
> seeddraws(100000) ///
> categories(2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 5 5 5 5) ///
> criterion(0.000001) ///
> rhoprior(1.0)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 observations deleted)
(0 observations deleted)
(0 observations deleted)
variable Female was float now byte
variable Under18 was float now byte
variable o1824 was float now byte
variable Age_2534 was float now byte
variable Age_3544 was float now byte
variable Age_4554 was float now byte
variable Age_5564 was float now byte
variable Age_65 was float now byte
variable Occupation_employed was float now byte
variable Occupation_unemployed was float now byte
variable Occupation_student was float now byte
variable Occupation_pensioner was float now byte
variable Occupation_childcare was float now byte
variable Highereducation was float now byte
variable Higherincome was float now byte
variable q2_42 was float now byte
variable q2_43 was float now byte
variable q2_47 was float now byte
variable q2_49 was float now byte
variable q6_11 was float now byte
variable q6_12 was float now byte
variable q6_13 was float now byte
variable q6_14 was float now byte
variable q6_15 was float now byte
variable q6_16 was float now byte
variable q6_17 was float now byte
variable not_necessary was float now byte
variable Practical_reason was float now byte
variable Unabletouse_reason was float now byte
variable Totalban was float now byte
variable Banpavementriding was float now byte
variable q0_10 was float now byte
variable q5_2_8 was float now byte
variable q5_2_9 was float now byte
variable q5_2_10 was float now byte
(128,625 bytes saved)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
591 contradictions in 1,225 observations
assertion is false
r(9);
end of do-file
r(9);
error message is " assertion is false r(9);"
An example of a data set is as follows
Female | Under18 | o1824 | Age_2534 | Age_3544 | Age_4554 | Age_5564 | Age_65 | Occupation_employed | Occupation_unemployed | Occupation_student | Occupation_pensioner | Occupation_childcare | Highereducation | Higherincome | q2_42 | q2_43 | q2_47 | q2_49 | q6_11 |
1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 |
1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 |
1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 1 |
1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 |
0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 |
0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 |
0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 |
This is a bit of a mess, but I'd appreciate it if someone could help me find a solution to this problem.
Comment