Dear community,
It is my first time using STAT and I am stuck with an assignment.
It says: "In Stata, you can use the function “runiform()” to randomize the selection process. Please set a seed using “set seed #” to obtain the same random numbers, which makes the subsequent results reproducible. The following lines demonstrate how this can be done:
set seed x
generate random = runiform()
Note that x in the first line above is any positive integer (between 0 and 231−1).
Using an appropriate filter on the newly created variable “random” choose your 1000 random observations."
My question:
How do I set the filter for the newly created variable so that I get only 1000 observations?
Thank you for your help
Related Posts with appropriate filter
Loop over households and individualsHi, I want to create a variable that gives me the amount of children aged 17 and younger (children1…
loop to change variable's valueHi! My first post here. So, I want to reshape from long to wide. The variables are called cc_know_* …
loop regressionDear, I have a set of different dependent variables and a common set of controls. Furthermore, I ne…
Create a date variable from a variable of the "int" type.Hello! I am currently trying to create a "date" variable from my current variable named "Date". I …
system of equations with endogenous variable and random effects (panel data)Dear all, we need to estimate a system of three linear equations with an endogenous variable on pan…
Subscribe to:
Post Comments (Atom)
0 Response to appropriate filter
Post a Comment