[R] circular regression question

Antonio Silva aolinto.lst at gmail.com
Sun Oct 25 00:19:17 CEST 2015


Dear R users

I'm trying to reproduce the results from Lowry et al. 2007 Lunar landings -
Relationship between lunar phase and catch rates for an Australian
gamefish-tournament fisheryFisheries Research 88: 15–23

Basically we have two columns: Lunar  days and CPUE (catch per unit effort).
The aim is to test whether CPUE varies with the lunar cycle

Here is what I did:

library(circular)
# Black marlin CPUE
U<-c(0.02,0.024,0.017,0.02,0.018,0.034,0.042,0.026,0.017,0.019,0.006,0.008,0.011,0.014,0.007,0.018,0.008,0.004,0.008,0.013,0.011,0.008,0.006,0.004,0.008,0.005,0.016,0.011,0.022,0.048)
# Lunar day
LD <- seq(1:30)
# Lunar Day in radians
LDrad <- (360*LD)/29.58
# Plots
plot(U~LD)
plot(U~LDrad)
# Transform
LDcir <- circular(U,LDrad,type=c("angles"),units=c("radians"))
# circular model
circ.lm<-lm.circular(y=U,x=LDcir,init=1,type="c-l",verbose=TRUE)

but it runs with
circ.lm<-lm.circular(x=U,y=LDcir,init=1,type="c-l",verbose=TRUE)

Nevertheless U must be the dependent variable, not the independent one.

I also tried

Uy <- cbind(U,rep(1,length(U)))
circ.lm<-lm.circular(y=Uy,x=LDcir,init=2,type="c-l",verbose=TRUE)

Well I really appreciate any help, thanks in advance,

Antonio Olinto

	[[alternative HTML version deleted]]



More information about the R-help mailing list