naive_kmeans: Estimate a partially functional linear regression model with...

Description Usage Arguments

View source: R/pena_utility.R

Description

In the first step, a family-wise estimator is calculated. In the second step, the classic K-means algorithm is applied to cluster the families. The number of groups and the number of principal components are determined by the BIC criterion.

Usage

1
naive_kmeans(data_list, num_group_vec, num_pca_vec, est_fix_eff = TRUE)

Arguments

data_list

A list of data. Several elements must be present in the list. The reponse y, the functional covariate x_recv, the scalar covariates z, and an index matrix index. The functional covariate x_recv must be generated from the fda package by, e.g., spline smoothing. The scalar covariates z is a matrix. The index matrix index is a data.frame recording the structure of the data. The first column of index is the family number, the second column is the within family index. The column names of index must be ind_b and ind_w.

num_group_vec

A vector of candidate number of groups.

num_pca_vec

A vector of candidate number of principal components.

est_fix_eff

A logical value. If TRUE, then the fixed effects are estimated. Otherwise, the fixed effects are not estimated


wangwustat/fdagroup documentation built on Dec. 5, 2019, 12:51 a.m.