Re: [R] Generating input population for microsimulation

2016-06-20 Thread Dielia Ba
Hi everyone, I really need your help !! I am currently working on a micro-simulation project and I cannot find a package in R that does what I want. Here is the picture: I have macroeconomic variables such as income,consumption, household weight and I calculated the elasticities already. I

Re: [R] Generating input population for microsimulation

2011-12-14 Thread Jan van der Laan
Emma, If, as you say, each unit is the same you can just repeat the units to obtain the required number of units. For example, unit_size - 10 n_units - 10 unit_id - rep(1:n_units, each=unit_size) pid - rep(1:unit_size, n_units) senior - ifelse(pid = 2, 1, 0) pop -

Re: [R] Generating input population for microsimulation

2011-12-14 Thread Emma Thomas
...@yahoo.com Sent: Wednesday, December 14, 2011 6:18 AM Subject: Re: [R] Generating input population for microsimulation Emma, If, as you say, each unit is the same you can just repeat the units to obtain the required number of units. For example,   unit_size - 10   n_units - 10   unit_id - rep(1

Re: [R] Generating input population for microsimulation

2011-12-14 Thread Emma Thomas
- From: Emma Thomas thomas...@yahoo.com To: Jan van der Laan rh...@eoos.dds.nl; r-help@r-project.org r-help@r-project.org Cc: Sent: Wednesday, December 14, 2011 12:23 PM Subject: Re: [R] Generating input population for microsimulation Dear Jan, Thanks for your reply. The first solution

Re: [R] Generating input population for microsimulation

2011-12-14 Thread Jan van der Laan
will be useful in the future. Thanks again! Emma - Original Message - From: Jan van der Laan rh...@eoos.dds.nl To: r-help@r-project.org r-help@r-project.org Cc: Emma Thomas thomas...@yahoo.com Sent: Wednesday, December 14, 2011 6:18 AM Subject: Re: [R] Generating input population

[R] Generating input population for microsimulation

2011-12-13 Thread Emma Thomas
Hi all, I've been struggling with some code and was wondering if you all could help. I am trying to generate a theoretical population of P people who are housed within X different units. Each unit follows the same structure- 10 people per unit, 8 of whom are junior and two of whom are senior.