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 a
n the future.
Thanks again!
Emma
- Original Message -
From: Jan van der Laan
To: "r-help@r-project.org"
Cc: Emma Thomas
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 sa
Emma
- Original Message -
From: Emma Thomas
To: Jan van der Laan ; "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 works well for
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:n_units, each=unit_size)
pi
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 <- d
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. I
6 matches
Mail list logo