Dear all,
I am writing Stata program to compute GAP statistic in order to get the optimal number of clusters by Kmeans. In the original paper https://web.stanford.edu/~hastie/Papers/gap.pdf page 415 first paragraph, the author says "In each case,......, each of which is computed from a Monte Carlo sample X*1, ...,X*n drawn from our reference distribution".
Now I have the reference distribution below, would you please help me to get the "Monte Carlo sample X*1, ...,X*n"?
Reference distribution
Best regards,
Jack
I am writing Stata program to compute GAP statistic in order to get the optimal number of clusters by Kmeans. In the original paper https://web.stanford.edu/~hastie/Papers/gap.pdf page 415 first paragraph, the author says "In each case,......, each of which is computed from a Monte Carlo sample X*1, ...,X*n drawn from our reference distribution".
Now I have the reference distribution below, would you please help me to get the "Monte Carlo sample X*1, ...,X*n"?
Reference distribution
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input double(a b c d e) 13.336472424 3.6547876887 3.6674377564 6.2780269058 8.1 12.770520302 3.4139535384 3.5463077098 6.4496124031 9 14.61777432 3.8405060564 3.7293172095 7.8451882845 8.2 13.681277261 3.5871028676 3.7009998862 7.187718074 8.5 14.895449189 3.8255983216 3.8608586399 9.5185995624 7 12.57323461 3.4462837308 3.47408953 6.0612991766 8.9 12.827010385 3.4176724062 3.6237328885 8.0327449476 7.9 12.245115586 3.3389946167 3.5084280734 7.7625570776 8.4 14.450302454 3.6967572038 3.7449727447 8.3807553026 7.2 14.961117462 3.8310325427 3.7624601169 6.5605270382 8.4 end
Jack