0
$\begingroup$

I am running something like

clttest truth, cluster(userid) by(envyfree)

and every time I run the command I get different results, which is super shady. Truth and envyfree are 0-1 variables. Any possible explanations would be most helpful. ​​​​​​​ I attach two figures showing the different results:

enter image description here

enter image description here

$\endgroup$
0
$\begingroup$

Haven't used stata, but in R there is there is a function called set.seed. What this does is seeds a random number generator, meaning any result from random data can be replicated http://rfunction.com/archives/62.

Would be surprised if there wasn't an equivalent in stata. If your test requires a random sample then that should make it replicable.

$\endgroup$
2
  • $\begingroup$ Thanks @willbutdontwanna. These results are not generated with random data, but with a meaningful dataset that keeps constant. But I still generate different results! $\endgroup$
    – fox
    Sep 9 at 10:34
  • 1
    $\begingroup$ I meant the actual test itself involves a degree of randomisation. Which if I am interpreting correctly seems to be the case: fmwww.bc.edu/RePEc/bocode/c/clttest.hlp let me know if retaining the randomisation doesn't work though and I'll delete the post if not. $\endgroup$ Sep 9 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.