# How to perform PCA on angular data in R?

I've been looking for a way to perform PCA on angular data in R and haven't succeeded yet.

I have a set of monitoring data for each of multiple plant species on the number of flowers opened at every 30 min (like 3 flowers opened at 0:00, 2 flowers at 0:30, 0 flowers at 1:00, ..., 5 flowers at 23:30). I want to reduce these time values to the 1st component from PCA (PC1) then use it as the responding variable of each plant species for the latter analyses.

I plan to convert time data to angles on a 24-h clock before analyses. Because my data are circular (or angular, directional, however you call it), I guess I cannot perform an ordinary PCA. I mean, 0:00 should be treated as a similar value with 23:30 even if their angles look different (0 and 352.5 degrees).

I would greatly appreciate if you could kindly give me a direction, thank you so much!

• Time of day is circular here, but it's not a response or outcome variable. As I understand your outcome is a count of flowers open. No obvious role for PCA here at all, and certainly not for time of day. – Nick Cox Jun 16 '17 at 9:09
• Could you tell us what you hope a PCA on circular data might mean? After all, the concept of linear combinations of those data is not directly relevant and might even be misleading if applied. What are you hoping to achieve as a result? – whuber Jun 16 '17 at 14:35
• Thank you so much! I want to classify flower-opening patterns into several types like morning-type, afternoon-type, sunset-type, etc. I can do it just by looking at the data, but I found this paper (doi:10.1098/rspb.2010.0501). These authors reduced the reflectance values at every 10 nm from the flowers of each species to the first component from PCA (i.e., PC1), and used it for cluster analysis (Fig. 1). I could try the same if I could deal with the circular data (time spectrum of opening-flower numbers). Also, PC1 could be used for other analyses such as GLM. How do you think? – bbKZO Jun 18 '17 at 11:27

As a practical solution, you can consider performing the PCA on $(\cos\theta, \sin\theta),$ but to some extend this does not take into account the circular nature of the data as well as some other.