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
Svy Command and incorrect coefficientHi, I am using two waves of DHS survey and I need to run a weighted regression of education on age a…
Type mismatch errorHi all, I am having a type mismatch error for the following code (final line before the curly brace…
offset variable in panel data GEEHi, stata users I want some explanation about "offset variable" My dataset below is a unbalanced pa…
Explanation of Dependent log variableI'm using a vector of log dependent variables due to a change in the main variable of interest ( whi…
ppmlhdfe, keepsingletonDear statalist members, I am using ppmlhdfe to investigate the bilateral trade flow and have a ques…
Subscribe to:
Post Comments (Atom)
0 Response to appropriate filter
Post a Comment