https://github.com/cran/flexmix
Raw File
Tip revision: 524cce11dd9be72a35b73973bc267839b4f19f60 authored by Bettina Gruen on 06 August 2010, 00:00:00 UTC
version 2.2-8
Tip revision: 524cce1
Lapply-methods.Rd
%
%  Copyright (C) 2004-2008 Friedrich Leisch and Bettina Gruen
%  $Id: Lapply-methods.Rd 3934 2008-03-26 08:36:26Z gruen $
%
\name{Lapply-methods}
\docType{methods}
\title{Methods for Function Lapply}
\alias{Lapply,FLXRmstep-method}
\description{Apply a function to each component of a finite mixture}
\usage{
\S4method{Lapply}{FLXRmstep}(object, FUN, model = 1, component = TRUE, ...)
}
\arguments{
  \item{object}{S4 class object.}
  \item{FUN}{The function to be applied.}
  \item{model}{The model (for a multivariate response) that shall be
    used.}
  \item{component}{Index vector for selecting the components.}
  \item{\dots}{Optional arguments to 'FUN'.}
}
\section{Methods}{
  \describe{
    \item{object = FLXRmstep:}{Apply a function to each component of a
      refitted \code{flexmix} object using method = \code{"mstep"}.}
  }  
}
\details{
  'FUN' is found by a call to 'match.fun' and typically is specified
  as a function or a symbol (e.g. a backquoted name) or a character
  string specifying a function to be searched for from the
  environment of the call to 'Lapply'.
}
\value{
  A list of the length equal to the number of components specified is
  returned, each element of which is the result of applying 'FUN' to the
  specified component of the refitted mixture model.
}
\keyword{methods}
\author{Friedrich Leisch and Bettina Gruen}
\examples{
data("NPreg")
ex2 <- flexmix(yn ~ x, data = NPreg, k = 2, model = list(FLXMRglm(yn ~ 
    . + I(x^2)), FLXMRglm(yp ~ ., family = "poisson")))
ex2r <- refit(ex2, method = "mstep")
Lapply(ex2r, "vcov", 2)
}
back to top