Function used in the FPCA step for registering binary functional data,
called by register_fpca
when family = "binomial"
.
This method uses a variational EM algorithm to estimate scores and principal components for
binary functional data.
bfpca(
Y,
npc = 1,
Kt = 8,
maxiter = 50,
t_min = NULL,
t_max = NULL,
print.iter = FALSE,
row_obj = NULL,
seed = 1988,
...
)
An object of class fpca
containing:
Cutpoints for B-spline basis used to rebuild alpha
.
\(D \times npc\) matrix of estimated FPC basis functions.
Estimated variance of the FPC scores.
number of FPCs.
\(I \times npc\) matrix of estimated FPC scores.
Estimated population-level mean.
Estimated population-level mean. Same value as alpha
but included for compatibility
with refund.shiny
package.
B-spline basis coefficients used to construct subject-specific means.
For use in registr()
function.
FPC approximation of subject-specific means.
The observed data.
binomial
, for compatibility with refund.shiny
package.
vector containing error for each iteration of the algorithm.
Dataframe. Should have variables id, value, index.
Default is 1. Number of principal components to calculate.
Number of B-spline basis functions used to estimate mean functions. Default is 8.
Maximum number of iterations to perform for EM algorithm. Default is 50.
Minimum value to be evaluated on the time domain.
Maximum value to be evaluated on the time domain.
Prints current error and iteration
If NULL, the function cleans the data and calculates row indices.
Keep this NULL if you are using standalone register
function.
Set seed for reproducibility. Default is 1988.
Additional arguments passed to or from other functions
Julia Wrobel jw3134@cumc.columbia.edu, Jeff Goldsmith ajg2202@cumc.columbia.edu
Jaakkola, T. S. and Jordan, M. I. (1997). A variational approach to Bayesian logistic regression models and their extensions. Proceedings of the Sixth International Workshop on Artificial Intelligence and Statistics.
Tipping, M. E. (1999). Probabilistic Visualisation of High-dimensional binary data. Advances in neural information processing systems, 592--598.
Y = simulate_functional_data()$Y
bfpca_object = bfpca(Y, npc = 2, print.iter = TRUE)
Run the code above in your browser using DataLab