zt_irls: The IRLS Function

Description Usage Arguments Details Author(s) See Also Examples

View source: R/zt_irls.R

Description

This function is designed to perform an IRLS algorithm to calculate parameters for regression on a given dataset (this will be designed to handle count data).

Usage

1
zt_irls(formula, data, epsilon = 0.001, maxit = 10, ...)

Arguments

formula

A formula of the equation that should be used for regression.

data

The data that should be used. Formula should use variable names as seen in the data.

epsilon

This is the criterion for convergence: set manually, for getting a feel for how it works

maxit

The maximum number of iterations you are willing to sit through before you blow your brains out...

...

Not currently supported.

Details

This is a practice function to see if I'm understanding the concepts (and if it actually runs). Documentation is provided purely for practice.

Author(s)

Michael Floren

See Also

zeroinfl

Examples

1
2
3
4
5
6
7
8
9
# using the "fish" dataset, downloaded with this package
# ztfish <- read.csv("http://www.ats.ucla.edu/stat/data/fish.csv") #if you want to grab it manually
# ztfish <- ztfish[ztfish$count>0,]

#an example with a two way interaction
zt_irls(count~persons*camper, ztfish)

#an example with a three way interaction
zt_irls(count~persons*camper*nofish, ztfish)

flor3652/BigD documentation built on Aug. 3, 2019, 7:27 p.m.