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
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 -
...@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
-
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
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
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.
6 matches
Mail list logo