%%
%% WARNING! DO NOT EDIT!
%% This file is automatically generated from rgeneric.R
%%
\name{rgeneric.define}
\alias{rgeneric}
\alias{rgeneric.define}
\alias{inla.rgeneric.define}
\alias{rgeneric.ar1.model}
\alias{inla.rgeneric.ar1.model}
\alias{rgeneric.iid.model}
\alias{inla.rgeneric.iid.model}
\alias{rgeneric.wrapper}
\alias{inla.rgeneric.wrapper}
\alias{rgeneric.q}
\alias{inla.rgeneric.q}

\title{rgeneric models}

\description{A framework for defining latent models in R}

\usage{
inla.rgeneric.define(model = NULL, debug = FALSE, compile = TRUE, optimize = FALSE, ...)
inla.rgeneric.iid.model(
        cmd = c("graph", "Q", "mu", "initial", "log.norm.const", "log.prior", "quit"),
        theta = NULL)
inla.rgeneric.ar1.model(
        cmd = c("graph", "Q", "mu", "initial", "log.norm.const", "log.prior", "quit"),
        theta = NULL)
inla.rgeneric.ar1.model.opt(
        cmd = c("graph", "Q", "mu", "initial", "log.norm.const", "log.prior", "quit"),
        theta = NULL)
inla.rgeneric.wrapper(
        cmd = c("graph", "Q", "mu", "initial", "log.norm.const", "log.prior", "quit"),
        model, theta = NULL)
inla.rgeneric.q(
        rmodel,
        cmd = c("graph", "Q", "mu", "initial", "log.norm.const", "log.prior", "quit"),
        theta = NULL)
}

\arguments{
  \item{model}{The definition of the model; see \code{inla.rgeneric.ar1.model}}
  \item{rmodel}{The rgeneric model-object, the output of \code{inla.rgeneric.define}}
  \item{debug}{Logical. Turn on/off debugging}
  \item{compile}{Logical. Compile the definition of the model or not.}
  \item{optimze}{Logical. With this option \code{TRUE}, then \code{model}
                 pass only the values of \code{Q} and not the whole matrix.
                 Please see the vignette for details and
                 \code{inla.rgeneric.ar1.model.opt} for an example.}
  \item{cmd}{An allowed request}
  \item{theta}{Values of theta}
  \item{...}{Named list of variables that defines the environment of \code{model}}
  \item{debug}{Logical. Enable debug output}
}

\value{%%
  This allows a latent model to be
  defined in \code{R}.
  See \code{inla.rgeneric.ar1.model} and
  \code{inla.rgeneric.iid.model} and the documentation for
  worked out examples of how to define latent models in  this way.
  This will be somewhat slow and is intended for special cases and
  protyping. The function \code{inla.rgeneric.wrapper} is for
  internal use only.}
\author{Havard Rue \email{hrue@r-inla.org}}
