Reading the help page with attention I saw that this function fits a regression model for "circular dependent and linear independent".
So my question now is, is there a way to fit a model been with the circular as the dependent variable? Thanks Antonio 2015-10-24 20:19 GMT-02:00 Antonio Silva <aolinto....@gmail.com>: > 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 > -- Antônio Olinto Ávila da Silva Biólogo / Oceanógrafo Instituto de Pesca (Fisheries Institute) São Paulo, Brasil [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.