search for: slopediff

Displaying 7 results from an estimated 7 matches for "slopediff".

2018 May 22
0
Using tryCatch in a for loop
...reg <- lm(y.val~year, mydata) > ? ? seg.reg <- segmented.lm(lin.reg, seg.Z = ~ year, psi = NA, control = seg.control(stop.if.error = FALSE, n.boot = 0, it.max = 20)) > ? ? RSyear <- summary(seg.reg)$psi [1,2] > ? ? SlopeRegime1 <- summary(seg.reg)$coefficients[2,1] > ? ? SlopeDiff <- summary(seg.reg)$coefficients[3,1] > ? ? new.regimeshift <- data.frame(RSyear=RSyear, SlopeRegime1=SlopeRegime1, SlopeDiff=SlopeDiff) > ? ? rownames(new.regimeshift) <- colnames(y)[i] > ? ? regimeshift <- rbind(regimeshift,new.regimeshift) > ? ? print(regimeshift) &gt...
2018 May 22
2
Using tryCatch in a for loop
...al <- y[,i] lin.reg <- lm(y.val~year, mydata) seg.reg <- segmented.lm(lin.reg, seg.Z = ~ year, psi = NA, control = seg.control(stop.if.error = FALSE, n.boot = 0, it.max = 20)) RSyear <- summary(seg.reg)$psi [1,2] SlopeRegime1 <- summary(seg.reg)$coefficients[2,1] SlopeDiff <- summary(seg.reg)$coefficients[3,1] new.regimeshift <- data.frame(RSyear=RSyear, SlopeRegime1=SlopeRegime1, SlopeDiff=SlopeDiff) rownames(new.regimeshift) <- colnames(y)[i] regimeshift <- rbind(regimeshift,new.regimeshift) print(regimeshift) }, error= function(e) {c...
2018 May 22
4
Using tryCatch in a for loop
...al <- y[,i] ? ? lin.reg <- lm(y.val~year, mydata) ? ? seg.reg <- segmented.lm(lin.reg, seg.Z = ~ year, psi = NA, control = seg.control(stop.if.error = FALSE, n.boot = 0, it.max = 20)) ? ? RSyear <- summary(seg.reg)$psi [1,2] ? ? SlopeRegime1 <- summary(seg.reg)$coefficients[2,1]? ? ? SlopeDiff <- summary(seg.reg)$coefficients[3,1]? ? ? new.regimeshift <- data.frame(RSyear=RSyear, SlopeRegime1=SlopeRegime1, SlopeDiff=SlopeDiff) ? ? rownames(new.regimeshift) <- colnames(y)[i] ? ? regimeshift <- rbind(regimeshift,new.regimeshift) ? ? print(regimeshift) ? }, error= function(e) {c...
2018 May 22
0
Using tryCatch in a for loop
...eg <- lm(y.val~year, mydata) > seg.reg <- segmented.lm(lin.reg, seg.Z = ~ year, psi = NA, control = > seg.control(stop.if.error = FALSE, n.boot = 0, it.max = 20)) > RSyear <- summary(seg.reg)$psi [1,2] > SlopeRegime1 <- summary(seg.reg)$coefficients[2,1] > SlopeDiff <- summary(seg.reg)$coefficients[3,1] > new.regimeshift <- data.frame(RSyear=RSyear, > SlopeRegime1=SlopeRegime1, SlopeDiff=SlopeDiff) > rownames(new.regimeshift) <- colnames(y)[i] > regimeshift <- rbind(regimeshift,new.regimeshift) > print(regimeshift) &g...
2018 May 22
3
Using tryCatch in a for loop
...al <- y[,i] ? ? lin.reg <- lm(y.val~year, mydata) ? ? seg.reg <- segmented.lm(lin.reg, seg.Z = ~ year, psi = NA, control = seg.control(stop.if.error = FALSE, n.boot = 0, it.max = 20)) ? ? RSyear <- summary(seg.reg)$psi [1,2] ? ? SlopeRegime1 <- summary(seg.reg)$coefficients[2,1]? ? ? SlopeDiff <- summary(seg.reg)$coefficients[3,1]? ? ? new.regimeshift <- data.frame(RSyear=RSyear, SlopeRegime1=SlopeRegime1, SlopeDiff=SlopeDiff) ? ? rownames(new.regimeshift) <- colnames(y)[i] ? ? regimeshift <- rbind(regimeshift,new.regimeshift) ? ? print(regimeshift) ? }, error= function(e) {c...
2018 May 22
0
Using tryCatch in a for loop
...eg <- lm(y.val~year, mydata) > seg.reg <- segmented.lm(lin.reg, seg.Z = ~ year, psi = NA, control = > seg.control(stop.if.error = FALSE, n.boot = 0, it.max = 20)) > RSyear <- summary(seg.reg)$psi [1,2] > SlopeRegime1 <- summary(seg.reg)$coefficients[2,1] > SlopeDiff <- summary(seg.reg)$coefficients[3,1] > new.regimeshift <- data.frame(RSyear=RSyear, > SlopeRegime1=SlopeRegime1, SlopeDiff=SlopeDiff) > rownames(new.regimeshift) <- colnames(y)[i] > regimeshift <- rbind(regimeshift,new.regimeshift) > print(regimeshift) &g...
2018 May 22
0
Using tryCatch in a for loop
...eg <- lm(y.val~year, mydata) > seg.reg <- segmented.lm(lin.reg, seg.Z = ~ year, psi = NA, control = > seg.control(stop.if.error = FALSE, n.boot = 0, it.max = 20)) > RSyear <- summary(seg.reg)$psi [1,2] > SlopeRegime1 <- summary(seg.reg)$coefficients[2,1] > SlopeDiff <- summary(seg.reg)$coefficients[3,1] > new.regimeshift <- data.frame(RSyear=RSyear, > SlopeRegime1=SlopeRegime1, SlopeDiff=SlopeDiff) > rownames(new.regimeshift) <- colnames(y)[i] > regimeshift <- rbind(regimeshift,new.regimeshift) > print(regimeshift) &g...