uht2beta: Gaussian Response Curves and Coefficients

Description Usage Arguments Details Value Author(s) Examples

View source: R/uht2beta.R

Description

The function converts parameters of a Gaussian response curve into polynomial linear coefficients, or the reverse. Works for single gradient only.

Usage

1
2
3
uht2beta(u, h = NULL, t = NULL)
beta2uht(b0, b1 = NULL, b2 = NULL)
respgau(x, param, uht = TRUE)

Arguments

u

Optimum (location) of the curve. can be a vector of length 3 when u, h and t are provided at once.

h

Expected height of the curve at optimum.

t

Tolerance (standard deviation of the normal density).

b0, b1, b2

Regression coefficients for intercept, linear term, quadratic term. b0 can be a vector of length 3 when b0, b1 and b2 are provided at once.

x

Vector of predictor values to calculate gaussian response for.

param

Parameters in 'uht' or 'beta' format (see Details).

uht

Logical, if parameters are provided as 'uht' or 'beta' formats (see Details).

Details

uht2beta is useful for generating Gaussian species responses to environmental gradients using the species occurrence/abundance generating functions. It converts the 'uht' format to 'beta'.

beta2uht does the reverse job. It converts the 'beta' format to 'uht'.

respgau calculates response values for a predictor vector given the parameters provided.

Value

A 3 element vector for regression coefficients: first is the intecept, second is for the linear term, third is for the squared term.

Author(s)

Peter Solymos

Examples

1
2
3
4
5
6
uht2beta(25, 10, 15)
beta2uht(1.5, 0.005, -0.001)
x <- respgau(-50:50, c(25, 10, 15))
y <- respgau(-50:50, c(1.5, 0.005, -0.001), FALSE)
plot(x, type = "l", col = 2)
lines(y, col = 4)

rspecies documentation built on May 2, 2019, 4:43 p.m.

Related to uht2beta in rspecies...