Login  Register

Re: random selection from multiple measures

Posted by Bruce Weaver on Sep 05, 2014; 12:33am
URL: http://spssx-discussion.165.s1.nabble.com/random-selection-from-multiple-measures-tp5727162p5727163.html

Here are some functions you may find useful.

RV.UNIFORM(min, max). Numeric. Returns a random value from a uniform distribution with specified minimum and maximum. See also the UNIFORM function.

RND(numexpr[,mult,fuzzbits]). Numeric. With a single argument, returns the integer nearest to that argument. Numbers ending in .5 exactly are rounded away from 0. For example, RND(-4.5) rounds to -5. The optional second argument, mult, specifies that the result is an integer multiple of this value—for example, RND(-4.57,0.1) = -4.6. The value must be numeric but cannot be 0. The default is 1.


tino wrote
Dear All,

I have repeated measures of the same observational units; specifically, for each observational unit, there are 6 measurements.

From these six measurements, I need to randomly select one measurement for each person.

For example, if there were 100 persons measured six times, there would be 600 measurements. From these 600 measurement, I would need 100 measurements, but each person should only be sampled once.

Say "person" is numbered from 1 to 100, and "measurements" is numbered from 1 to 6. Which sytnax could I use to make the kind of selection outlined above? Many thanks for your help!

Tino

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).