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
Coding variables with options "Yes" "No" and "Other"Hello all, I have what I believe should be a pretty simple problem but I'm getting tripped up, most…
How can I test the meditation effect for count models (i.e. poisson, negative binomial)Dear statisticians, I want to test whether a variable M plays a mediating role in the effect of X o…
coefplot displacing CI barsHello, I'm using the coefplot command to plot the association between a given covariate and a numbe…
Interactions with geographic variables to avoid loosing observations in a comparative analysisHi! I'm analyzing the association of different economic variables with the subjective well-being of…
Help with pcspike to display a paired plot with namesI am using Nick Cox's example code to produce a 'paired plot with names' as in Dr. Cox's "Speaking S…
Subscribe to:
Post Comments (Atom)
0 Response to appropriate filter
Post a Comment