Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Different results with the same code
From
Estrella Gomez <[email protected]>
To
[email protected]
Subject
st: Different results with the same code
Date
Mon, 10 Feb 2014 10:07:58 +0100
Dear Statalisters
I am running a code and I have realized that every time I run it the
results (the coefficients and the standard errors) are different. This
is the code:
clear all
use "itunes_grav_song", clear
sort id country orig
egen nb_id=tag(id)
bysort orig: egen nr_orig=sum(nb_id)
bysort orig country: egen nr_dest=sum(available)
gen avail_share=(nr_dest/nr_orig)
collapse (count) nr_songs=id (firstnm) contig comlang ldist
avail_share, by(country orig)
encode country, gen(d_id)
encode orig, gen(o_id)
gen home=country==orig
reg avail_share ldist comlang home i.d_id i.o_id
I have checked and after the collapse I obtain every time the same
dataset, so I don't know what can be the reason
Thanks for any help!
Estrella
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/