MAPLES-package: Smoothed age profile estimation.

Description Details Author(s) References Examples

Description

MAPLES is a general method for the estimation of age profiles that uses standard micro-level demographic survey data. The aim is to estimate smoothed age profiles and relative risks for time-fixed and time-varying covariates.

Details

Package: MAPLES
Type: Package
Version: 1.0
Date: 2011-04-08
License: GPL-2
LazyLoad: yes
LazyData: yes

Main functions in the package:
- epdata: prepare episode data for event history analysis
- splitter: Creates a time-varying factor variables within a episode-data.
- ageprofile: Computes smoothed transition rates by respondent's age (age profiles)
- plotap: plots age profiles.
Utilities:
- tabx: Prints univariate or a bivariate frequency distribution table including marginal distribution and total number of cases.
- tabm: Print regression estimates for previously fitted linear and logit regression models.
- mkdate: computes dates in continuous years or CMC.
- listvar: shows variables in a dataframe.

Author(s)

Roberto Impicciatore roberto.impicciatore@unimi.it

References

Impicciatore R. and Billari F.C., (2010), MAPLES: a general method for the estimation of age profiles from standard demographic surveys (with an application to fertility), DEAS WP,
http://ideas.repec.org/p/mil/wpdepa/2010-40.html

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# creates an episode-data structure relating to the transition 
# childless-->first child
ep1<-with(demogr,epdata(start=dbirth, event=dch1, rcensor=dint, 
          birth=dbirth,id=id,
          addvar=subset(demogr,select=c(-id,-dbirth)))) 

# creates a new episode-data structure with a time-varying factor 
# variable relating to the status "never married" (not_marr) or 
# "ever married" (marr)  
ep2<-splitter(ep1,split=ep1$d1marr,tvar.lev=c("not_marr","marr"),
              tvar.name="mar")

# Estimates age profiles for the transition to the first birth 
# according to the following factors: 
# sex (respondent'sex w/2 levels: 'Male', 'Female');
# edu ('Level of education w/3 levels: 'low_sec','upp_sec', 'tert');
# mar (ever married w/2 levels: 'not_marr', 'marr') 

ch1.ap<-ageprofile(formula=~sex+edu+mar, epdata=ep2, 
                   tr.name="First child", agelimits=c(15,50))        

# Plot age profiles in three different graphs
plotap(ch1.ap,base=TRUE, unsmoo=TRUE,
        lev=c("Male","Female"),title='first child by sex')
plotap(ch1.ap,base=TRUE, unsmoo=TRUE,
        lev=c("low_sec","upp_sec","tert"),title='first child by education')
plotap(ch1.ap,base=TRUE, unsmoo=TRUE,
        lev=c("not_marr","marr"),title='first child by marital status', 
        ylim=0.4) 

Example output

Loading required package: mgcv
Loading required package: nlme
This is mgcv 1.8-28. For overview type 'help("mgcv-package")'.
dev.new(): using pdf(file="Rplots1.pdf")
dev.new(): using pdf(file="Rplots2.pdf")

MAPLES documentation built on May 2, 2019, 9:41 a.m.