Learn R Programming

DyadRatios (version 1.3)

plot.extract: Plot Method for the extract Function.

Description

This function generates a line plot of the latent variable estimates obtained from the `extract()` function. It can handle both one-dimensional and two-dimensional latent variable estimates.

Value

A ggplot of the latent variable estimate(s) over time.

Arguments

x

An object of class "extract", typically a result of the `extract()` function.

...

Additional graphical parameters to be passed to the plot function.

Examples

Run this code
data(jennings)
dr_out <- extract(varname = jennings$variable, 
                  date = jennings$date, 
                  index = jennings$value, 
                  ncases = jennings$n, 
                  begindt = min(jennings$date), 
                  enddt = max(jennings$date), 
                  npass=1)
plot(dr_out)

Run the code above in your browser using DataLab