Description Usage Arguments Value Author(s) Examples
This function conducts a leave-one-out cross-validation approach to determine the best bandwidth for the data.
1 2 3 4 5 6 7 8 |
formula |
A formula class object. Provides information about the names of the response and predictor variables. |
data |
A data frame containing the variables needed for the function. |
time |
The name of the variable indicating the time points for each observation. |
id |
The name of the variable to group observations. Necessary when dealing with repeated measurements such as longitudinal data. |
bandwidths |
A vector containing the bandwidth values for the cross-validation. Default is tests 50 bandwidths from ranging from double the smallest time point difference to range of time points. |
kernel |
The name of the kernel function used to estimate the varying-coefficient values. Default is Epanechnikov. |
tvcm_cv returns a list containing the results from the cross-validation
recommended_bandwidth: The bandwidth with the smallest negative log-likelihood.
value: value of negative log-likelihood at recommended bandwidth
rss: The tested bandwidths and their corresponding negative log-likelihood value.
Isaac Quintanilla Salinas
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.