Stata's help documentation for set seed (https://www.stata.com/manuals/rsetseed.pdf) emphasizes that (A) seeds should be set only once per "problem" and that (B) the number for the seed should be as random as possible. It seems that this advice was devised with simulations in mind. I have several questions about this advice.
1. What is the definition of a "problem"? For example, suppose that I have N specifications (e.g. continuous vs binary variable; various choices of error distributions; etc.) and I want to run a simulation of 10,000 replications for each of them. Does each specification constitute a separate problem, such that it's alright to (A) set seeds for each specification and (B) use the same seed for each specification? This is equivalent to setting the same seed N times.
2. Do recommendations (A) and (B) only pertain to simulations? For example, suppose that I am working with real data and I want to use lasso for covariate selection. I have N dependent variables, some of which are possibly correlated, and want to run the lasso for each one. Can I just use the rseed() option with the same seed for each lasso? This is equivalent to setting the same seed N times.
Thanks in advance!
Related Posts with Clarification on choice of random seeds and how often to set seeds
Event study using princeton event study tool : event happening on weekend droppedDear Statalist, I am using Stata 12 and you can find an example of my dataset at the end of the mes…
Issue with calculating rolling betas for 36 months periodHi, hope this question and description is easy to comprehend I have gathered data for monthly retur…
[Help] Appending Using LoopingHello Stata wizards I am trying to append around ~35 excel files into 1 dta files. Luckily all the …
Foreach loop across variablesHi, I have over a thousand dummy variables for 30,000 data entries. I want to find a way to count th…
Loop stops at the second value of listI'm working on a loop to unzip many zipfiles which have in common title two values: 603 and 634. Hen…
Subscribe to:
Post Comments (Atom)
0 Response to Clarification on choice of random seeds and how often to set seeds
Post a Comment