CSMF5: Summarize and plot a population level distribution of va...

Description Usage Arguments Value Author(s) See Also Examples

Description

The function takes input of a list of va object and produces a summary plot for the population distribution.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
CSMF5(
  va,
  top.aggregate = NULL,
  InterVA.rule = FALSE,
  noplot = FALSE,
  title = "Top CSMF Distribution",
  type = "bar",
  top.plot = 10,
  return.barplot = FALSE,
  min.prob = 0,
  ...
)

Arguments

va

The list of va object to summarize.

top.aggregate

Integer indicating how many causes from the top need to go into summary. The rest of the probabilities goes into an extra category "Undetermined". When set to NULL, default is all causes to be considered. This is only used when InterVA.rule set to "FALSE".

InterVA.rule

If it is set to "TRUE", only the top 3 causes reported by InterVA5 is calculated into CSMF as in InterVA5. The rest of probabilities goes into an extra category "Undetermined". Default set to "FALSE".

noplot

A logical value indicating whether the plot will be shown. If it is set to "TRUE", only the CSMF will be returned.

title

A character string for the title of the CSMF plot.

type

An indicator of the type of chart to plot. "pie" for pie chart; "bar" for bar chart.

top.plot

the maximum number of causes to plot in bar plot

return.barplot

A logical indicating if the (barplot) ggplot() object should be returned (instead of printed). Default value is FALSE.

min.prob

The minimum probability that is to be plotted in bar chart, or to be labeled in pie chart.

...

Arguments to be passed to/from graphic function barplot, pie, and more graphical paramters (see par). They will affect the main title, size and font of labels, and the radius of the pie chart.

Value

dist.cod

The population probability of CODs.

Author(s)

Jason Thomas, Zehang LI, Tyler McCormick, Sam Clark

See Also

CSMF.interVA5

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
30
## Not run: 
data(RandomVA5)
# only fit first 20 observations for a quick illustration
RandomVA5 <- RandomVA5[1:20, ]

sample.output <- InterVA5(RandomVA5, HIV = "h", Malaria = "v", write = FALSE, 
       directory = tempdir(), filename = "VA5_result", output = "extended", 
       append = FALSE)

## Get CSMF by considering only top 3 causes reported by InterVA5.
## This is equivalent to using CSMF.interVA5() command Note that
## it's different from using all top 3 causses, since they may not
## all be reported
CSMF.summary <- CSMF5(sample.output, InterVA.rule = TRUE,
   noplot = TRUE)

## Population level summary using pie chart
CSMF.summary2 <- CSMF5(sample.output, type = "pie",
 min.prob = 0.01, title = "population COD distribution using pie chart",
 clockwise = FALSE, radius = 0.7, cex = 0.7, cex.main = 0.8)

## Population level summary using bar chart
CSMF.summary3 <- CSMF5(sample.output, type = "bar",
  min.prob = 0.01, title = "population COD distribution using bar chart",
  cex.main = 1)
CSMF.summary4 <- CSMF5(sample.output, type = "bar",
  top.plot = 5, title = "Top 5 population COD distribution",
  cex.main = 1)

## End(Not run)

InterVA5 documentation built on July 21, 2021, 5:06 p.m.