LocPointPrReg {frechet}R Documentation

Local Cox point process regression.

Description

Local Fréchet regression for replicated Cox point processes with respect to L^2-Wasserstein distance on shape space and Euclidean 2-norm on intensity factor space.

Usage

LocPointPrReg(xin = NULL, tin = NULL, T0 = NULL, xout = NULL, optns = list())

Arguments

xin

An n by p matrix with input measurements of the predictors, where p is at most 2.

tin

A list holding the sample of event times of each replicated point process, where the ith element of the list tin holds the event times of the point process corresponding to the ith row of xin.

T0

A positive scalar that defines the time window [0,T0] where the replicated Cox point processes are observed.

xout

A k by p matrix with output measurements of the predictors. Default is xin.

optns

A list of control parameters specified by list(name=value).

Details

Available control options are bwDen, kernelReg (see LocDenReg for these option descriptions) and

L

Upper Lipschitz constant for quantile space; numeric -default: 1e10.

M

Lower Lipschitz constant for quantile space; numeric -default: 1e-10.

dSup

User defined output grid for the support of kernel density estimation used in CreateDensity() for mapping from quantile space to shape space. This grid must be in [0,T0]. Default is an equidistant with nqSup+2 points.

nqSup

A scalar with the number of equidistant points in (0,1) used to obtain the empirical quantile function from each point process. Default: 500.

bwReg

A vector of length p used as the bandwidth for the Fréchet regression or "CV" (default), i.e., a data-adaptive selection done by leave-one-out cross-validation.

Value

A list containing the following components:

xout

Input xout.

dSup

Support of each estimated (up to a constant) conditional intensity regression function in the columns of intensityReg.

intensityReg

A matrix of dimension length(dSup) by nrow(xout) holding the estimated intensity regression functions up to a constant over the support grid dSup, where each column corresponds to a predictor level in the corresponding row of xout.

xin

Input xin.

optns

A list of control options used.

References

Petersen, A., & Müller, H.-G. (2019). "Fréchet regression for random objects with Euclidean predictors." The Annals of Statistics, 47(2), 691–719.

Gajardo, Á. and Müller, H.-G. (2022). "Cox Point Process Regression." IEEE Transactions on Information Theory, 68(2), 1133-1156.

Examples


n=100
alpha_n=sqrt(n)
alpha1=2.0
beta1=1.0
gridQ=seq(0,1,length.out=500+2)[2:(500+1)]
X=runif(n,0,1)#p=1
tau=matrix(0,nrow=n,ncol=1)
for(i in 1:n){
  tau[i]=alpha1+beta1*X[i]+truncnorm::rtruncnorm(1, a=-0.3, b=0.3, mean = 0, sd = 1.0)
}
Ni_n=matrix(0,nrow=n,ncol=1)
u0=0.4
u1=0.5
u2=0.05
u3=-0.01
tin=list()
for(i in 1:n){
  Ni_n[i]=rpois(1,alpha_n*tau[i])
  mu_x=u0+u1*X[i]+truncnorm::rtruncnorm(1,a=-0.1,b=0.1,mean=0,sd=1)
  sd_x=u2+u3*X[i]+truncnorm::rtruncnorm(1,a=-0.02,b=0.02,mean=0,sd=0.5)
  if(Ni_n[i]==0){
    tin[[i]]=c()
  }else{
    tin[[i]]=truncnorm::rtruncnorm(Ni_n[i],a=0,b=1,mean=mu_x,sd=sd_x) #Sample from truncated normal
  }
}
res=LocPointPrReg(
  xin=matrix(X,ncol=1),
  tin=tin,T0=1,xout=matrix(seq(0,1,length.out=10),ncol=1),
  optns=list(bwDen=0.1,bwReg=0.1)
)


[Package frechet version 0.3.0 Index]