pts {adlift}R Documentation

pts

Description

This function constructs the gridpoints (X values) from a vector of lengths, with optional starting point.

Usage

pts(input)

Arguments

input a vector containing the X starting point in the first entry, and the distances between observed values. input[1] can be NA.

Details

The function constructs the grid values using the first entry in input as the first gridpoint, consecutively adding the given lengths in the rest of input to find the other gridpoints. If input[1] is NA, then the starting point of the gridpoint vector X is taken to be sum(lengths)/(length(lengths)+1).

Value

lengths a vector of length (length(input)-1) with the distances between the constructed gridpoints(this is input[2:length(input)]).
X the constructed gridpoint vector.

Author(s)

Matt Nunes (matt.nunes@bristol.ac.uk), Marina Popa (Marina.Popa@bristol.ac.uk)

See Also

fwtnp, fwtnpmp

Examples

y<-runif(20)
y
#
y1<-c(0,y)
y2<-c(NA,y)
#
#
pts(y1)$X
#the gridpoints, with specified startpoint of zero.
#
#
pts(y2)$X
#the grid vector with unspecified startpoint.
# 


[Package adlift version 0.9-6 Index]