var.apc.plot.fit {apc}R Documentation

Variation on apc.plot.fit

Description

This command works in exactly the same way as the pre-existing command apc.plot.fit, but allows more control over aspects of the presentation. For example, the Y-axis labels are displayed horizontally rather than vertically.

Usage

	var.apc.plot.fit(apc.fit.model, scale = FALSE, sdv.at.zero = TRUE,
			type = "detrend", sub.plot = NULL, main.outer = NULL,
			main.sub = NULL, cex = NULL, cex.axis = NULL, cex.main = 2,
			mgp = c(2, 1, 0), theight = 1, mar = c(4, 3, 2, 0),
			oma = c(0, 0, 5, 1))

Arguments

apc.fit.model

List. See apc.fit.model for a description of the format.

scale

Optional. Logical. If (TRUE) FALSE use scale of (inverse) link function. Default is FALSE.

sdv.at.zero

Optional. Logical. If FALSE/TRUE standard deviations are plotted around estimates/zero. Default is TRUE.

type

Optional. Character. If "detrend" double sums start and end in zero. If "sum.sum" double sums anchored as discussed in Nielsen (2014b). Default is "detrend".

sub.plot

Optional. Character: "a","b",...,"i". Only the indicated sub plot is plotted. Default is NULL so all plots shown.

main.outer

Optional. Character. Main title in outer margin. Default is generated internally.

main.sub

Optional. Vector of 9 characters. Main titles for individual plots. Default is generated internally, see note 3 below.

cex

Optional. Plot parameter, see par. Controls size of text. Default is 1.

cex.axis

Optional. Plot parameter, see par. Controls size of axis annotations. Default is 1.

cex.main

Optional. Plot parameter, see par. Controls size of title text. Default is 2.

mgp

Optional. Plot parameter, see par. Controls location of axis, axis labels, and axis title.

theight

Optional. Plot parameter, see par. Controls distance between sub-plots and their headers. Default is 1.

mar

Optional. Plot parameter, see par. Controls size of margins of sub-plots.

oma

Optional. Plot parameter, see par. Controls size of outer margin.

Details

This command makes some minor adjustments to pre-existing apc.plot.fit, for example changing the default relative sizes of titles and orientation of the axes. It also brings more underlying par plot elements to the command line, allowing the user to exercise greater control over the appearance of the plots.

Author(s)

Zoe Fannon <zoe.fannon@economics.ox.ac.uk> 13 Jul 2018

References

Fannon, Z. (2018) apc.indiv: R tools to estimate age-period-cohort models with repeated cross section data. Mimeo. University of Oxford.

Fannon, Z., Monden, C. and Nielsen, B. (2018) Age-period-cohort modelling and covariates, with an application to obesity in England 2001-2014. Mimeo. University of Oxford.

See Also

The example below uses data from the NHIS, see data.NHIS.sample

Examples

data("data.NHIS.sample")

## Get appropriate data

# Period-cohort
PC_sub <- data.NHIS.sample[data.NHIS.sample$cohort>=1961 & data.NHIS.sample$cohort<=1968 &
                    data.NHIS.sample$period>=2008,]

# Estimate a model
M3 <- apc.indiv.est.model(PC_sub, dep.var = "Lbmi", 
                          covariates = c("daysbed", "nowsmoke",
                                         "eversmoke"),
                          model.family = "gaussian")

# Default plotting behaviour
var.apc.plot.fit(M3)

[Package apc version 1.3.4 Index]