curvplot.OEFPIL {OEFPIL}R Documentation

Plot of estimated curve for OEFPIL object

Description

Function for plotting the estimated curve with pointwise confidence bands for an object of class "OEFPIL".

Usage

curvplot.OEFPIL(object, signif.level, xx)

Arguments

object

an object of class "OEFPIL" (a result of a call to OEFPIL).

signif.level

a numeric value or a vector of significance levels for pointwise confidence bands. If missing, the estimated curve is plotted without confidence bands.

xx

a sequence of x-coordinates of points for computing and plotting confidence bands. If missing, the default sequence seq(from = min(x), to = max(x), length.out = 301) is used.

Value

A ggplot graph of the estimated curve with pointwise confidence bands. The result can be edit using other ggplot components as usually.

See Also

OEFPIL, paramplot.OEFPIL and plot.OEFPIL.

Examples

library(MASS)
library(ggplot2)

##Creating a data file
steamdata <- steam
colnames(steamdata) <- c("x","y")
n <- nrow(steamdata)
CM1 <- diag(rep(10,2*n))
CM2 <- diag(c(rep(12,n), rep(14,n)))

##Creating OEFPIL objects
st1 <- OEFPIL(steamdata, y ~ b1 * 10^(b2 * x/ (b3 + x)), list(b1 = 5, b2 = 8, b3 = 200),
             CM1, useNLS = FALSE)
st2 <- OEFPIL(steamdata, y ~ b1 * 10^(b2 * x/ (b3 + x)), list(b1 = 5, b2 = 8, b3 = 200),
             CM2, useNLS = FALSE)

##Use of curvplot.OEFPIL function on an object of class 'OEFPIL'
curvplot.OEFPIL(st1, signif.level = 0.05)

##Use of curvplot.OEFPIL function on an object of class 'OEFPIL' with different arguments
curvplot.OEFPIL(st2, signif.level = c(0.01,0.05), xx = seq(0,110,1))

##Use of curvplot.OEFPIL function with additional arguments as for ggplot2
curvplot.OEFPIL(st1, signif.level = 0.05) +
 labs(x = "New x label") +
 labs(title = "New graph title")


[Package OEFPIL version 0.1.1 Index]