Skip to contents

The function creates a scatter plot with the observed values (points), fitted regression (solid line) and its confidence interval (shaded area)

Usage

fn_figs(datos, CIPI, i, etiquetas, modelos)

Arguments

datos

A data frame containing the observed values of: independent variable (x); dependent (y) and adjusted (yc) variable; and Fleet (as factor).

CIPI

A data frame containing the values of sequence of independent variable (xseq); fitted values, confidence and predicted interval (lower and upper values).

i

An integer value indicating the regression analyzed.

etiquetas

A list indicating the labels of the axes and their unit of measurement.

modelos

A list of variables that are used for the regression model.

Value

Fig a customized scatter plot

Details

The function use the theme_papers() to customize the appearance of the plot and stored in the object Fig

The Inside the function, the mean (Ymean), lower (Ymin), and upper (Ymax) CI95 are save in a table (Table_Y)

See also

: theme_papers(): customized for the present work

: ggplot2 (version 3.4.4)

Examples

   if (FALSE) {
    FY <- fn_figs(datos, CIPI, i, etiquetas, modelos)
    }