Learn R Programming

vacem (version 0.1-1)

make.sample.pop: Generates a sample survey population with ages uniformly distributed...

Description

Generates a sample survey population with ages uniformly distributed in the specified range, (@p age.low, @p age.high), and all assigned the provided observation @p date.

Usage

make.sample.pop(N, age.low, age.high, date)

Arguments

N
the number of samples, i.e. population size
age.low
the minimum age (in months) for the sample population
age.high
the maximum age (in months) for the sample population
date
the observation date to use for all samples

Value

@c age@see runif

Examples

Run this code

N <- 10
dates <- c( "2005-05-01" ,"2007-07-02", "2009-09-03" )
make.sample.pop( N, 0, 25, array(dates,dim=N) )

Run the code above in your browser using DataLab