Open niekdt opened 3 years ago
Thank you for great develop for distance matrix change. But i have some question,
options(latrend.id = "Id", latrend.time = "Time") for(d_n in c("Mahalanobis")){ kmlMethod_i <- lcMethodKML(response = "Y", nClusters = 3, distanceName = d_n) model_i <- latrend(kmlMethod_i, data = latrendData) summary(model_i) print(plot(model_i)) }
as you mention that i try toy experiments but i got "Error in distance(x, clustersCenter[1, ]) : unused arguments (x, clustersCenter[1, ]): " message can i ask what is worng with my code?
and also i want to use correlation distance too. but it cannot be possible now. is there any comments and possible way?
i really want to know your answer or feedback. I look forward to hearing from you.
Thanks for reporting this, I'll look into it.
It's not yet possible to compute the correlation distance. Is there a package that has a function for that, that I could add?
Implement the Mahalanobis Distance (MD) as an internal metric. As MD is a distance measure, it could be used in different ways: measuring the distance of the trajectories to their most likely cluster trajectory, or measuring the distances between cluster trajectories.
Variations:
clusterTrajectories()
.[ ] MD.fitted: Mean distance of the fitted trajectories to their most likely cluster. Not applicable to many methods (e.g., KmL), as this would always be zero. On second thought, this cannot be computed for most models as the covariance matrix will be singular because of the similarity between fitted trajectories under a parametric model.