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
Identifying "Episodes"Hello All, I am doing a difference-in-difference analysis. I need to create an identifier, or a var…
Extracting multiple years mentioned in a stringHi, I am trying to identify the date when a drug reached Phase III in the clinical trial process. M…
Generating a Variable to store REGRESS R-Squared Value Across Observations for Multiple VariablesHello, I am using Stata 15.1 and I have two datasets. There are two economic values in each dataset…
keep banks (id) with 3-consecutive years of observation or more in my panel dataGreetings statalist users, I need help with codes to eliminate the entire id (along with all its ob…
No constant in first difference regressionI am running a first difference regression. I have seen the nocons option included on several posts …
Subscribe to:
Post Comments (Atom)
0 Response to Clarification on choice of random seeds and how often to set seeds
Post a Comment