Learn R Programming

HEAT (version 1.2)

summary.threshpt: Summary informations for a fitted threshpt object.

Description

summary provides summary statistics for a threshpt object produced by threshpt()

Usage

"summary"(object, ...)

Arguments

object
a fitted threshpt object produced by threshpt()
...
Not used

Value

summary.threshpt produces a list of summary informations for a fitted threshpt object with components
Formula
the formula which is used in the threshpt function
Best fit
estimated parameter coefficients of model with the minimum deviance
Deviance
deviance of a fitted threshpt model
Threshold
threshold value of the model with the minimum deviance

Examples

Run this code

# read the Seoul data set and create lag variables
data(mort)
seoul = read6city(mort, 11)
seoul_lag = lagdata(seoul, c("meantemp", "mintemp", "meanpm10", "meanhumi"), 5)

# find a optimal threshold and conduct piecewise linear regression
mythresh = threshpt(nonacc ~ meantemp_m3 + meanpm10_m2 +  meanhumi + ns(sn, 4*10) + factor(dow), 
			     expvar = "meantemp_m3", family = "poisson", data = seoul_lag,
			     startrng = 23, endrng = 33, searchunit = 0.2)

# provide summary informations
summary(mythresh)

Run the code above in your browser using DataLab