
This file folder includes program for presenting the histograms of the number of clusters under semiparametric fitting with G=100 for cocaine use data. i.e. Fig. 5 in Bayesian analysis of two-part nonlinear latent variable model: semiparametric method (statistical modeling). Among them,

   1. The routine 'main_PAR.c'is implemented to estimate the factor and unique scores from the posterior under parametric fitting. The results are saved in the files¡®omega0.dat' and ¡¯resid0.dat'.

   1. The routine 'main_SMI.c'is implemented to estimate the factor and unique scores from the posterior under semiparametric fitting. The results are saved in the files¡®omega1.dat', and ¡¯resid1.dat'.


  2. The Matlab routine 'exam_factorscore.m' is used to plot the histograms.

  3. The figure 'residu.fig' and ¡®red_exam.eps' are the plots of of the estimated scores under semi parametric fitting with G=100 for cocaine use data.
