search for: deviances2

Displaying 1 result from an estimated 1 matches for "deviances2".

Did you mean: deviances
2012 May 23
0
gam (mgcv) vs. multiple regression breakpoint analysis: inconsistencies?
...haps I'm doing something wrong, but the results go against my intuition. With kind regards, Martijn Wieling, University of Groningen ### breakpoint analysis using lm, both with and without covariate # note that AoEO indicates the AOA # LR denotes Length of Residence deviances1 = rep(Inf, 20) deviances2 = rep(Inf, 20) for (breakpoint in 6:20) { spk$ShiftedAoEO = spk$AoEO - breakpoint; spk$PastBreakPoint = as.factor(spk$ShiftedAoEO > 0); m1 = lm(LDlog ~ ShiftedAoEO:PastBreakPoint,data=spk) m2 = lm(LDlog ~ LR + ShiftedAoEO:PastBreakPoint,data=spk) deviances1[breakpoint] = deviance(m1) devia...