|
LCM(Latent Class Model)模型分类用lclogitwtp2命令计算WTP(Willingness to Pay)时,如果出现“last estimates not found”错误,常是在执行lclogitwtp2之前没有有效的估计结果。
运行lclogitwtp2之前,检查模型是否已估计
lclogit choicevar attr1 attr2 attr3, group(id) nclass(3)
查看这一命令成功运行并生成了估计结果。
在Stata中,某些命令需要在运行其他命令之前明确地保存估计结果。
运行lclogitwtp2之前,已正确保存模型的估计结果:
lclogit choicevar attr1 attr2 attr3, group(id) nclass(3)
estimates store lcm_model
然后用估计结果计算,运行lclogitwtp2命令时,指定已保存的估计结果:
lclogitwtp2, cost(trcost) using lcm_model
检查命令、语法:
lclogitwtp2, cost(trcost)
|