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
Need help with creating certain variablesHi. EmpCode OfficeCode Year Sept_30 In Out Existing 1 11 2011-12 . . 1 12 2011-12 1 . 1 . …
"i." Command: Omitted dummy variable due to collinearity (NOT the baseline omission)Hi all, When I use the i.command to run the regression as follows: Code: reg coverage i.year i.p…
How to get legend content equals the variable valueHello everyone, I am trying to plot data on covid-19 cases by country. Here my data: Code: * Exam…
R-squared of FE-regressionDear, with the following data: Code: * Example generated by -dataex-. To install: ssc install data…
Panel cointegration with I(0) and I(1) variablesHi all! I need to run a cointegration test with the indipendent variables of the model I(1) and the…
Subscribe to:
Post Comments (Atom)
0 Response to Clarification on choice of random seeds and how often to set seeds
Post a Comment