I am trying to create a predictive model using a relationship found by the
lm.circular function from the
circular package. The function, however, only provides statistics of the models fit and the intercept/coefficients, and I have been struggling to put together the equation of the linear model using these outputs. How can I take the outputs from this function and develop an equation to predict the y variable?
I've done some reading inJammalamadaka, S. Rao and SenGupta, A. (2001), Downs and Mardia (2002) and have included an example below taken from Pewsey, Neuhauser and Graeme (2013), but am still unsure of how to construct those relationships from what R is giving me.
library(circular) psideg <- c(356,97,211,232,343,292,157,302,335,302,324,85,324,340,157,238,254,146,232,122,329) thetadeg <- c(119,162,221,259,270,29,97,292,40,313,94,45,47,108,221,270,119,248,270,45,23) cpsirad <- circular(psideg*2*pi/360); cthetarad <- circular(thetadeg*2*pi/360) circ.lm <- lm.circular(type = "c-c", y = cthetarad, x = cpsirad, order = 1) plot.default(cthetarad, cpsirad, xlab = "cthetarad", ylab = "cpsirad", xlim = c(0, 7), ylim = c(-2, 7)) circ.lm$rho #> [,1] #> [1,] 0.502289 circ.lm$coefficients #> [,1] [,2] #> (Intercept) 0.01441183 0.1145101 #> cos.x 0.33465348 0.5494121 #> sin.x -0.07478683 0.4821004