search for: previousr2

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

Did you mean: previous
2010 Jul 16
3
Help with Sink Function
...miceTrainSample, kmax=15, kernel=c("rectangular"), distance=1)) predictedTrain <- predict(fit.train1, miceTrainSample, miceTrainSample$pID50) pID50Train <- miceTrainSample$pID50 lmTrain <- lm(predictedTrain~pID50Train) slm <- summary(lmTrain) str(slm) if (i == 1) { previousR2 <-slm$r.squared sink(file="R2outputKKNN.txt", append=TRUE) previousR2 sink() } else if(i!=1) { currentR2 <- slm$r.squared if (previousR2 > currentR2) { currentR2 <- previousR2 } if (previousR2 < currentR2) { sink(file="R2outputKKNN....