Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

loglm1

Fit Log-Linear Models by Iterative Proportional Scaling – Internal function


Description

loglm1 is an internal function used by loglm. It is a generic function dispatching on the data argument.

Usage

loglm1(formula, data, ...)

## S3 method for class 'xtabs'
loglm1(formula, data, ...)

## S3 method for class 'data.frame'
loglm1(formula, data, ...)

## Default S3 method:
loglm1(formula, data, start = rep(1, length(data)), fitted = FALSE,
       keep.frequencies = fitted, param = TRUE, eps = 1/10,
       iter = 40, print = FALSE, ...)

Arguments

formula

A linear model formula specifying the log-linear model. See loglm for its interpretation.

data

Numeric array or data frame (or list or environment). In the first case it specifies the array of frequencies; in then second it provides the data frame from which the variables occurring in the formula are preferentially obtained in the usual way.

This argument may also be the result of a call to xtabs.

start, param, eps, iter, print

Arguments passed to loglin.

fitted

logical: should the fitted values be returned?

keep.frequencies

If TRUE specifies that the (possibly constructed) array of frequencies is to be retained as part of the fitted model object. The default action is to use the same value as that used for fitted.

...

arguments passed to the default method.

Value

An object of class "loglm".

See Also


MASS

Support Functions and Datasets for Venables and Ripley's MASS

v7.3-54
GPL-2 | GPL-3
Authors
Brian Ripley [aut, cre, cph], Bill Venables [ctb], Douglas M. Bates [ctb], Kurt Hornik [trl] (partial port ca 1998), Albrecht Gebhardt [trl] (partial port ca 1998), David Firth [ctb]
Initial release
2021-04-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.