Learn R Programming

aplms (version 0.1.0)

plot.aplms: Default APLMS plotting

Description

Compute and plot the estimated mean and confidence intervals of the non-parametric component of a `APLMS` object fited by `aplms()`.

Usage

# S3 method for aplms
plot(x, len = 100, plot = TRUE, level = 0.95, ...)

Value

Return a list of all non parametric component functions with their confidence intervals. If plot=TRUE, the estimated nonparametric component functions are plotted.

Arguments

x

an object with the result of fitting additive partial linear models with symmetric errors.

len

The desired length of the sequence of covariates to compute the non parametric component functions.

plot

a logical value to return plots. Default value is TRUE.

level

Confidence level.

...

other arguments.

Examples

Run this code
data(temperature)
temperature.df = data.frame(temperature,time=1:length(temperature))
model<-aplms::aplms(temperature ~ 1,
                   npc=c("time"), basis=c("cr"),Knot=c(60),
                   data=temperature.df,family=Powerexp(k=0.3),p=1,
                   control = list(tol = 0.001,
                                  algorithm1 = c("P-GAM"),
                                  algorithm2 = c("BFGS"),
                                  Maxiter1 = 20,
                                  Maxiter2 = 25),
                   lam=c(10))
plot(model)

Run the code above in your browser using DataLab