I am trying to simulate patients in different populations useing SPSS.
I would like to create 3 populations of simulated patients, population size (the number of patients in each population) should be a variable and each patient should have a variable for risk factor. the risk factor should be calculated by a random number generator. e.g. pop1 pat1 risk1 pop1 pat2 risk2 pop1 pat3 risk3 pop1 pat4 risk4 pop2 pat5 risk5 pop2 pat6 risk6 pop3 pat7 risk7 pop3 pat8 risk8 pop3 pat9 risk9 pop3 pat10 risk10 Please help... |
Administrator
|
Search this group and the FM for INPUT PROGRAM.
--
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
This is a demo of
simulating t-tests. it would not
be horrendous to
1) create more groups 2) use another distribution for the DV 3) wrap the whole thing in an outer loop and keep some stats via aggregate or oms. Art Kendall Social Research ConsultantsOn 1/3/2013 12:53 PM, David Marso wrote: Search this group and the FM for INPUT PROGRAM. -- igabbay wroteI am trying to simulate patients in different populations useing SPSS. I would like to create 3 populations of simulated patients, population size (the number of patients in each population) should be a variable and each patient should have a variable for risk factor. the risk factor should be calculated by a random number generator. e.g. pop1 pat1 risk1 pop1 pat2 risk2 pop1 pat3 risk3 pop1 pat4 risk4 pop2 pat5 risk5 pop2 pat6 risk6 pop3 pat7 risk7 pop3 pat8 risk8 pop3 pat9 risk9 pop3 pat10 risk10 Please help...----- Please reply to the list and not to my personal email. Those desiring my consulting or training services please feel free to email me. -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/SPSS-Patient-Simulation-tp5717212p5717215.html Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== 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 ===================== 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
Art Kendall
Social Research Consultants |
Administrator
|
That is some very concise code Art ;-)
--
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
In reply to this post by Art Kendall
oops sent post before I
pasted the demo syntax
* prepare two distributions as for t-test demo. set seed 20101802. input program. loop #i = 1 to 25. compute group =1. compute x = rv.normal(22,5). end case. end loop. loop #i = 1 to 25. compute group =2. compute x = rv.normal(27,6). end case. end loop. end file. end input program. T-TEST GROUPS=group(1 2) /variables = x. Art Kendall Social Research ConsultantsOn 1/3/2013 1:04 PM, Art Kendall wrote:
===================== 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
Art Kendall
Social Research Consultants |
I will be working from home Thursday (1/3/12) afternoon and all day Friday (1/4/12).
|
In reply to this post by igabbay
Elaborate on what you mean by "risk factor."
Ryan On Jan 3, 2013, at 11:20 AM, igabbay <[hidden email]> wrote: > I am trying to simulate patients in different populations useing SPSS. > > I would like to create 3 populations of simulated patients, population size > (the number of patients in each population) should be a variable and each > patient should have a variable for risk factor. the risk factor should be > calculated by a random number generator. > > e.g. > > pop1 pat1 risk1 > pop1 pat2 risk2 > pop1 pat3 risk3 > pop1 pat4 risk4 > pop2 pat5 risk5 > pop2 pat6 risk6 > pop3 pat7 risk7 > pop3 pat8 risk8 > pop3 pat9 risk9 > pop3 pat10 risk10 > > Please help... > > > > -- > View this message in context: http://spssx-discussion.1045642.n5.nabble.com/SPSS-Patient-Simulation-tp5717212.html > Sent from the SPSSX Discussion mailing list archive at Nabble.com. > > ===================== > 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 ===================== 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 |
Free forum by Nabble | Edit this page |