Learn R Programming

phenmod (version 1.2-7)

result.rsquare: R-square calculation.

Description

Calculates the r-square value of a model.

Usage

result.rsquare(values, type="cod")

Arguments

values

A list containing the modelled (doy.model) and the observed (doy.observed) values.

type

The value of type (either ‘cod’ or ‘pearson’) determines whether the coefficient of determination or the squared pearson correlation coefficient is calculated.

Value

The r-square as numeric value.

Details

Calculates the r-square value of modelled values with given observed values.

See Also

result.main

Examples

Run this code
# NOT RUN {
 	modelled <- c(100,102,98,97,96)
	observed <- rep(100,5)
	values <- list(doy.model=modelled, doy.observed=observed)
	result.rsquare(values, type="cod")
# }

Run the code above in your browser using DataLab