2
$\begingroup$

I routinely scale non-circular variables using methods you can see here. If I use the same methods with circular data, the cutoff creates issues, such as huge "jumps" in the data depending on the "direction" (decreasing/increasing) in which the data go while scaling... I hope it is clear enough. I read here that maybe I am trying an impossible task?!

Question: How can I scale a circular variable (e.g. the circular variable is in the range of 0-1 and I want to scale it in the range of 0.25-0.75)?

(I use R)

Edit: I have a dataset consisting of check-in times of many individuals. They can check-in from 00:00 till 24:00 and I want to simulate their distribution if they have to check-in from 08:00 till 20:00.

I know that approximation is somewhat biased, but I would like to use it as a starting point. If I use the methods I linked, issues arise, e.g. if a check-in time is near the "cut-off/extremes", 1:59:59 will be transformed to 20:00, 2:00:01 will be transformed to 08:00, creating a huge "gap/jump" in the data because of mere seconds

$\endgroup$
6
  • 4
    $\begingroup$ What is best to do may depend on why you want to scale it. What are you trying to achieve by doing this? $\endgroup$ Commented Oct 7 at 18:33
  • 4
    $\begingroup$ A circular variable wraps around back to some origin once it passes the high limit. Is there some specific reason you want the origin to be at 0.25 and to have a value wrap back to that value once it passes 0.75, as your question suggests? What's the problem with having the values start back at 0 when they wrap around? Or do want to get rid of the wrap-around altogether? Please address the comments by editing the question itself, as comments are easy to overlook and can be deleted. $\endgroup$
    – EdM
    Commented Oct 7 at 19:51
  • 1
    $\begingroup$ Can you please elaborate what you mean by a cyclic variable in the range [0,1) and what rescaling should mean (if 0 and 1 are the same values, shall 0.25 and 0.75 become the same values)? Which values should be mapped to 0.75 and which to 0.25? Does, e.g., $x\to 0.25 + \sin(\pi x)^2 / 2$ do the trick? $\endgroup$
    – cdalitz
    Commented Oct 7 at 19:56
  • 1
    $\begingroup$ There's a fairly mindless solution that is likely to work well with PCA: express your circular variable as a (cosine, sine) pair and scale each coordinate separately. You might want to check for near collinearity and replace that pair with a linear combination of the components and scale that. This choice can be informed by your understanding of the effects of including nearly redundant variables in PCA. (Pending your responses to previous comments, though, this cannot be construed as an answer: it's just a comment.) $\endgroup$
    – whuber
    Commented Oct 7 at 19:57
  • $\begingroup$ I apologize if I was not clear enough. I edited the question $\endgroup$ Commented Oct 8 at 10:23

0