search for: tempint

Displaying 2 results from an estimated 2 matches for "tempint".

Did you mean: tempin
2012 May 31
1
fitting allometric equation using a for a power model
...t(page 1130) but that doesn't seem to help much - if anything the fit looks worse. Data and code below: temppow<-lm(log(y)~log(x)) plot(log(y)~log(x)) plot(residuals(temppow), main="pow") abline(temppow) plot(y~x, main="pow") tempsum<-summary(temppow)$adj.r.squared tempint<-summary(temppow)$coefficients[1,1] #intercept of power function tempslope<-summary(temppow)$coefficients[2,1] #slope of power function tempmin<-min(x) tempmax<-max(x) lngth<-c(tempmin:tempmax) # vector from the minimum to the maximum values of independent variable prediction<-exp...
2012 Jun 01
1
trouble with append() in a for loop
...,565 33400.49145,510 and the code is: xy<-read.csv(xy.csv) x<-xy$x y<-xy$y cross.val.error.temp<-numeric(0) b<-c(1:length(x)) for(i in b){ frame.val.temp<-data.frame(x,y) frame.val<-frame.val.temp[-i,] yt<-frame.val$y xt<-frame.val$x temppow.val<-lm(log(yt)~log(xt)) tempint.val<-summary(temppow.val)$coefficients[1,1] #intercept of power function tempslope.val<-summary(temppow.val)$coefficients[2,1] nls.model.val<-nls(yt~exp(intercept)*((xt)^slope), start=list(intercept=tempint.val, slope=tempslope.val)) prediction.cross.val<-((exp(intercept.nls))*((x[i])^s...