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

wr

Find the Response Vector and Design Matrix for a W\&R Model Formula


Description

wr gives the response vector and design matrix for a formula in Wilkinson and Rogers notation.

Usage

wr(formula, data=NULL, expand=TRUE)

Arguments

formula

A model formula.

data

A data object or environment.

expand

If FALSE, the covariates are read from the tccov object without expanding to the length of the response variable.

Value

wr returns a list containing the response vector (z$response), if included in the formula, and the design matrix (z$design) from the data object or environment supplied or from the global environment for the formula supplied.

Author(s)

J.K. Lindsey

Examples

y <- rnorm(20)
x <- gl(4,5)
z <- rpois(20,2)
wr(y~x+z)

rmutil

Utilities for Nonlinear Regression and Repeated Measurements Models

v1.1.5
GPL-2
Authors
Bruce Swihart [cre, aut], Jim Lindsey [aut] (Jim created this package, Bruce is maintaining the CRAN version)
Initial release

We don't support your browser anymore

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