puldet {unknown}R Documentation

Pulse Detection


This function accomplishes the second step of the algorithm in Yang, Liu and Wang (2004). It detects pulse locations.


puldet(x, y, data, baseline=list(nb=~x, rk=cubic(x)), 
       start, type = c("dblexp", "user"), 
       params=list(infrate="common", decrate="mixed", amplitude="mixed"), 
       pulse.usr=list(shape, parlist, devlist, drop.var), 
       weights = NULL, correlation = NULL, control=pul.control())


x a vector of observation time points.
y a vector of hormone concentrations.
data a data frame containing the variables occurring in the x and y arguments. If this option is not specified, the variables should be on the search list. Missing values are not allowed.
baseline a list specifies the model space for the baseline function. nb is a one-sided formula specifying the basis of the null space. rk is an expression specifying the reproducing kernel of the orthogonal complementary space to the null space. The default options of nb and rk correspond to the cubic spline. If baseline=0, the baseline function is fixed at its initial input.
start a list of initial values. It includes four components: puloc, a vector of initial pulse locations; kmin, the minimal number of pulses at which the program will stop the elimination process; fixed, a vector of starting values for the common and fixed parameters specified in the argument params or in the component parlist of the argument pulse.usr (note that the order is very important: the initial values for common parameters appear before those for fixed parameters); Inif, initial baseline estimates evaluated at x.
type a character string specifies a predefined type of the pulse shape functions. If type="dblexp", a double exponential function will be used as the pulse shape function. If type="user", the user can input the shape function and parameters in the argument pulse.usr.
params when type="dblexp", params is a list of three components, infrate, decrate and amplitude, which correspondingly specifies models to be assumed for the pulse infussion rate, pulse decay rate and pulse amplitude parameters. Current possible options are “common” for infrate; “common”, “fixed” and “mixed” for pulse decrate; “fixed”, “mixed” and “random” for amplitude. Here “common” means that a common parameter is assumed in all pulses; “fixed” means that different deterministic parameters are assumed for all pulses; “random” means that the parameters are assumed to be from a normal distribution with mean 0; “mixed” means that the paramters are assumed to be from a normal distribution with a unknown constant mean. Current program assumes that all random parameters are independent.
pulse.usr when type="user", pulse.usr is a list of four components, shape, parlist, devlist, and drop.var, which correspondingly specify the pulse shape, pulse parameters, first derivatives of the pulse shape function with respect to the parameters, and the variable used to drop pulses. shape is a formula. parlist is a list of character vectors with four components: common, random, fixed, and p. The component common specifies fixed parameters used in the pulse formula which are common for all pulses; the component random specifies random parameters in the pulse formula; and the component fixed specifies fixed parameters which are different for each pulse. Current program assumes that all random parameters are independent. The fourth component p is used to specify the parameter name of the pulse locations. devlist is a list of the derivatives in the order of the common, random and fixed parameters. For each type of parameters, the order should be consistent with the order of the parameters supplied in parlist. drop.var is a character variable that specifies which parameter to use for dropping a pulse. Note that this parameter should not be specified as common.
weights an optional varFunc object or one-sided formula describing the heteroscedasticity structure. See the documentation on varClasses in the nlme package for a description of the available varFunc classes. Defaults to NULL, corresponding to homoscesdatic errors.
correlation an optional corStruct object describing the correlation structure. See the documentation of corClasses in the nlme package for a description of the available corStruct classes. Defaults to NULL, corresponding to no correlations.
control a list of control values for the estimation algorithm to replace the default values returned by the function pul.control.


puldet creates a sequence of nested sets of pulse locations by eliminating the least significant locations one-by-one, and selects final pulse locations by a model selection criterion such as AIC, BIC, RIC and GCV.


a list which contains

tbl a summary matrix of the detection process with columns correspond to the number of pulses (NP), BIC, RIC, AIC, GCV, total degrees of freedom (DF), degrees of freedom of the baseline function (df(base)), smoothing parameters in log10 scale (nlaht), residual sum of squares (RSS), residual variance (Sigma2), the index of the location dropped at the current iteration (DROP).
est a list, with each component again a list recording estimation at each set of pulse locations. Each sublist contains the following components: coef for estimated parameters; Var for variance of the estimated parameters; baseFitted for baseline fit; nlmeFitted for fit of pulsatile hormone secretions; nlmeObj for nlme object of the nlme function if it is used; gnlsObj for gnls object of the gnls function if it is used; callxObj for object returned from the inside function NLMEcallx.
stat a list of matrices recording the statistics used to dertimine the “DROP” variables.
detloc a list of four sublists AIC, GCV, BIC and RIC, with each sublist contains the estimated pulse number (pulnum) and pulse locations (puloc), as well as estimated coefficients (coef), baseline function (baseline) and pulsatile hormone secretions based on the selected model.


Yu-Chieh Yang, Anna Liu, Yuedong Wang


Pinheiro, J. and Bates, D. M. (2000), Mixed-effects Models in S and S-plus, Springer, New York.

Yang, Y. (2002), Detecting Change Points and Hormone Pulses Using Partial Spline Models, Ph.D. Thesis, University of California-Santa Barbara, Dept. of Statistics and Applied Probability.

Yang, Y. and Liu, A. and Wang, Y., (2004), Detecting Pulsatile Hormone Secretions Using Nonlinear Mixed Effects Partial Spline Models. Available at www.pstat.ucsb.edu/faculty/yuedong/research.

Wang, Y. and Ke, C. (2002), ASSIST: A Suite of S-plus functions Implementing Spline smoothing Techniques. Available at cran.us.r-project.org/src/contrib/PACKAGES.html. Manual for the ASSIST package is available at www.pstat.ucsb.edu/faculty/yuedong/software.

See Also

baseini, nlme, pul.control, pulini, ssr, summary.puldet


det.cmr <- puldet(time, conc, data=acth, type=c("dblexp"),
    baseline=list(nb=~time, rk=cubic(time)),
    start=list(puloc=pl1, kmin=5, fixed=fix.ini[1:2], Inif=bl1),
    params=list(infrate="common", decrate="mixed", amplitude="random"))

det.ccm <- puldet(time, conc, data=acth, type=c("dblexp"),
    start=list(puloc=pl1, kmin=5, fixed=fix.ini, Inif = bl1),
    params=list(infrate="common", decrate="common", amplitude="mixed"))

[Package Contents]