# Video explainers of the veloclinic Mean Maximal Power Duration Models

Part 2 Example Fits

Also see the Derivation.

Below are the equations since they are a little hard to see in the video.

#2 secret exp top linear bottom

fo <- y~ w1/x*(1-exp(-x/tau1))*((1-exp(-x/10))^alpha) + pow2/(1+x/tau2)
rpowb <- nls2(fo, start=list(w1 = rw1, tau1 = rtau1b, pow2 = rpow2, tau2 = rtau2, alpha = .1 ), data = dspow)
presidb<-resid(rpowb)/y*100

plot(log=”x”, x,y)
lines(x, predict(rpowb), col=”purple”)

#2 secret exp top regen fixed bottom
fo <- y~ w1/x*(1-exp(-x/tau1))*((1-exp(-x/10))^alpha) + pow2/(1+x/5400)^(1/beta)
rpowc <- nls2(fo, start=list(w1 = rw1, tau1 = rtau1b, pow2 = rpow2, alpha = .1, beta = 1), data = dspow)
presidc<-resid(rpowc)/y*100

plot(log=”x”, x,y)
lines(x, predict(rpowc), col=”red”)
#2 secret flock exp top and  bottom
fo <- y~ w1/x*(1-exp(-x/tau1))*((1-exp(-x/10))^alpha) + pow2*tau2/x*(1-exp(-x/tau2))
rpowe <- nls2(fo, start=list(w1 = rw1, tau1 = rtau1, pow2 = rpow2, tau2 = 15000, alpha = .1), data = dspow)
preside<-resid(rpowe)/y*100