Abteilung Grünland und Futterbau/Ökologischer Landbau

Modelle

Modelle

mod <- lme(log(FrachtproMethan) ~ Duengung * NForm, 
           random = ~1|Block, 
           data = daten)

anova(mod)

mod2 <- lme(log(FrachtproMethan) ~ 0 + Duengung:NForm + NForm, 
            random = ~1|Block, 
            data = daten)
mod <- lme(Methan ~  ELOS + ADL + HCEL  + CELL + XP + XL + XZ, 
           data=daten, 
           random = ~ 1|Block/Jahr,  
           method="ML")
mod <- stepAIC(mod,trace=0)
AIC(mod)
# breakpoint, slope, plateau
lrp <- function(x, breakpoint, slope, plateau) {
  ifelse(x < breakpoint, 
         plateau + slope * (x-breakpoint), 
         plateau)
}
  
mod = try(nls(t ~ lrp(Ninput, k, slope, plateau)
          , data=dsub
          , algorithm = "port"
          , start=list(k=300,slope=0.5,plateau=maxeff)
          , lower = list(k = 0, slope = -0.5, plateau = 0)
          , upper = list(k = max(hm$Ninput), slope = 0.5, plateau = maxeff)
          , control=list(maxiter=1000, minFactor = 1/2^50)))



expDecayModel <- function(predictor, k, y0, plateau) {
  (y0 - plateau)*exp(-k*predictor) + plateau
}

expDecayModelInit <- function (mCall, LHS, data) {
  xyframe <- sortedXyData(mCall[["predictor"]], LHS, data)
  x <- xyframe$x
  y <- xyframe$y
  
  y0 <- max(y)
  plateau <- min(y)
  ymid <- (y0 + plateau)/2
  
  closesty <- y[1]
  closestyindex <- 1
  for (i in 2:length(y)) {   
    if (abs(y[i] - ymid) < abs(closesty - ymid)) {   
      closesty <- y[i]
      closestyindex <- i
    }
  }
  xatclosesty = x[closestyindex]
  k = 1 / xatclosesty
  value = c(k, y0, plateau)
  names(value) <- mCall[c("k", "y0", "plateau")]
  value
}

SSexpDecay <- selfStart(expDecayModel, expDecayModelInit, c("k", "y0", "plateau"))


mod = try(nls(t ~ SSexpDecay(Ninput, k, y0, plateau)
          , data=dsub, algorithm = "port"
          , lower = list(k = 0, y0 = 0, plateau = 0)
          , upper = list(k = 1, y0 = maxeff * 2, plateau = maxeff )
          , control=list(maxiter=1000, minFactor = 1/2^50)))
Aktuelles

Lehre

Forschung und Publikationen

Links