Nothing
## Calculate R^2 and adj R^2 from nls result
##' @importFrom 'stats' 'residuals' 'var'
nlsR2 <- function(nlsAns, # return from a nls() call
y, # response vector
p) # number of parameters
{
n <- length(y)
rsds <- residuals(nlsAns)
rr <- sum(rsds^2) / var(y) / (length(y) - 1)
R2 <- 1 - rr
adjR2 <- 1 - rr * (n - 1) / (n - p)
return(list(R2 = R2, adjR2 = adjR2))
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.