sicure.vf {sicure}R Documentation

Estimation of the vector of parameters in a single-index mixture cure model with a vector and a functional covariate

Description

This function provides the estimation of the vector of parameters in a single-index mixture cure model with a vector and a functional covariate (see Piñeiro-Lamas, 2024, Section 5.1, page 99). A Functional Principal Components Analysis (FPCA) representation that explains at least the (propvar*100)% of the variability of the functional data is considered (for more details, see Ramsay and Silverman, 2005).

Usage

sicure.vf(x_cov_v, x_cov_f, time, delta, propvar = 0.9, randomsearch = FALSE)

Arguments

x_cov_v

A matrix or data frame giving the vector covariate values. Each row represents an individual and each column corresponds to a variable.

x_cov_f

A matrix or data frame n x m giving the functional covariate values. Each row represents an individual (a curve); m is the number of observed points in each curve.

time

A numeric vector giving the observed times.

delta

A numeric vector giving the values of the uncensoring indicator, where 1 indicates that the event of interest has been observed and 0 indicates that the observation is censored.

propvar

Minimum proportion of explained variability with the FPCA representation.

randomsearch

A logical value, FALSE by default, specifying whether a random search of the initial iterant is considered.

Details

The infinite-dimensional nature of the functional data is reduced via FPCA. This basis representation is then truncated, reducing the dimension to K, where each functional observation is summarized into a vector of scores, (\xi_1, \xi_2, \dots, \xi_K). Once this reduction is performed, if the vector covariate has dimension d, a combined joint vector variable can be constructed by considering both the vector covariate and the functional scores, resulting in a total dimension of d + K. This joint variable can then be analyzed within the framework of a single-index mixture cure model with a vector of covariates. For more details on the estimation process and the specific arguments, see sicure.v function, which focuses on single-index mixture cure models with a vector of covariates.

Value

A list with the following components:

par

A numeric vector of the estimated parameters. The last four correspond to the logarithms of the bandwidths.

value

The value of the objective function (negative log-likelihood) at the estimated parameters.

si

The estimated single-index variable.

References

Piñeiro-Lamas, B. (2024). High dimensional single-index mixture cure models [PhD thesis]. Universidade da Coruña. Available at https://ruc.udc.es/dspace/handle/2183/37035

Ramsay, J. O., and Silverman, B. W. (2005). Functional Data Analysis, 2nd ed., Springer, New York.

See Also

sicure.v, sicure.f

Examples

# Some artificial data
set.seed(123)
n <- 50
mix1a<-rnorm(n,mean=0,sd=1); mix1b<-rnorm(n,mean=0.25,sd=sqrt(2)); alf1<-rbinom(n,1,0.2)
mix2a<-rnorm(n,mean=0,sd=1); mix2b<-rnorm(n,mean=0.25,sd=sqrt(2)); alf2<-rbinom(n,1,0.2)
mix1<-alf1*mix1a+(1-alf1)*mix1b; mix2<-alf2*mix2a+(1-alf2)*mix2b
x_cov_v<-array(c(mix1,mix2),dim=c(n,2)) # Matrix of covariate values
theta<-c(1,1.2)
Z<-colSums(theta*t(x_cov_v))
y<-Z+rnorm(n,sd=sqrt(abs(Z))) # True lifetimes
# Probability of being susceptible
p_fun <- function(x){ 0.55 * exp(1.5*x+1.5)/(1+exp(1.5*x+1.5)) + 0.001 }
for (i in 1:n){
   w <- runif(1)
   if (w > p_fun(Z[i])) y[i] <- Inf
}
c<-rexp(n,rate=0.98) # Censoring values
t<-pmin(y,c) # Observed times
d = 1 * (y<=c) # Uncensoring indicator
# Functional covariate:
# Number of individuals (rows)
n <- 50
# Numbers of observations per individual (columns)
m <- 100
# Observation times (between 0 and 1)
x <- seq(0, 1, length.out = m)
# Auxiliar function to simulate the other functions by adding some noise
# Shift controls the horizontal displacement of the functions
sim_func <- function(x, shift, sd_noise) {
  # positive-negative-negative waves
  sin(2*pi*(x + shift))+sin(4*pi*(x + shift))-sin(6*pi*(x + shift))+rnorm(m, 0, sd_noise)
}
# Simulated functions
data_matrix <- matrix(NA, nrow=n, ncol=m)
for (i in 1:n) {
  shift <- runif(1, -0.05, 0.05)
  data_matrix[i, ] <- sim_func(x, shift, sd_noise = 0.03)
}
matplot(x, t(data_matrix), type = "l", lty = 1, ylab='f(x)')

suppressWarnings(sicure.vf(x_cov_v, data_matrix, t, d, 0.9))


[Package sicure version 0.1.0 Index]