negbin: negbin

Description Usage Arguments Details Value

View source: R/main.R

Description

negbin fits a negative binomial model and return multiple test statstics given a variable y and a variable x.

Usage

1
negbin(y_var, x_var)

Arguments

y_var

a vector of numeric representing the y variable

x_var

a vector of numeric representing the x variable

Details

The negbin function fits a negative binomial model to a sets of x and y variables Confident intervals are created correspondingly to measure the level of confidence against the trend. The slope and intercept of the resulting model will be recorded and returned. Things to take notice: 1. y and x need to have the same length 2. Theoretically saying, negbin is the most versatile among the three trend tests. The preferred condition to use negbin function is when there are neither an excess amount of zeros, nor can the trend be calculated by Mann-Kendall test. Under these conditions, consider using the two other functions instead.

Value

a dataframe of the form || slope || intercept || ConfidenceLevel ||


sarahforte/CESIfun documentation built on Dec. 22, 2021, 10:16 p.m.