% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/procmod_model.R
\name{procmod_model}
\alias{procmod_model}
\alias{procmod_model.terms}
\alias{procmod_model.formula}
\alias{procmod_model.pm}
\alias{procmod_model.default}
\title{Extracting the ProcMod Frame from a Formula or Fit.}
\usage{
procmod_model(formula, ...)

\method{procmod_model}{terms}(
  formula,
  data = NULL,
  subset = NULL,
  na_action = na.fail,
  drop.unused.levels = FALSE,
  ...
)

\method{procmod_model}{formula}(
  formula,
  data = NULL,
  subset = NULL,
  na_action = na.fail,
  drop.unused.levels = FALSE,
  ...
)

\method{procmod_model}{pm}(formula, ...)

\method{procmod_model}{default}(
  formula,
  data = NULL,
  subset = NULL,
  na_action = na.fail,
  drop.unused.levels = FALSE,
  ...
)
}
\arguments{
\item{formula}{}

\item{...}{}

\item{data}{an optional procmod frame, list or environment (or object
coercible by \code{\link[ProcMod]{as_procmod_frame}} to a procmod frame)
containing the variables in the model. If not found in data, the variables
are taken from environment(formula), typically the environment from which
\code{pm} is called.}

\item{subset}{subset    an optional vector specifying a subset of observations
to be used in the fitting process.}

\item{na_action}{a function which indicates what should happen when the data
contain NAs. The default is set by the \code{na.action} setting of
\code{\link[base]{options}}, and is \code{\link[stats]{na.fail}} if that is
unset. The ‘factory-fresh’ default is \code{\link[stats]{na.omit}}. Another
possible value is NULL, no action. Value \code{\link[stats]{na.exclude}} can
be useful.}

\item{drop.unused.levels}{should factors have unused levels dropped? Defaults
to FALSE.}
}
\description{
\code{procmod_model}, if the equivalent of \code{\link[stats]{model.frame}}
for Procrustean models. It creates a design (or model)
\code{\link[ProcMod]{procmod_frame}}, with the variables needed to use
formula and any ... arguments.
}
\author{
Eric Coissac

Christelle Gonindard-Melodelima
}
