\HeaderA{varHistPlot}{Variance histogram and density}{varHistPlot}
\keyword{univar}{varHistPlot}
\keyword{manip}{varHistPlot}
\begin{Description}\relax
Will produce a histogram of observed variance estimators (logged) together with the fitted density.
\end{Description}
\begin{Usage}
\begin{verbatim}
varHistPlot(model,main="Histogram variance estimators",
           histCol=8,densityCol=2,drawLegend=TRUE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{model}] On object obtained from the function plw or lmw.
\item[\code{main}] Main title of plot.
\item[\code{histCol}] Color for histogram bars.
\item[\code{densityCol}] Color for density function.
\item[\code{drawLegend}] To draw a legend or not.
\end{ldescription}
\end{Arguments}
\begin{Author}\relax
Magnus \eqn{\mbox{\AA}}{}strand
\end{Author}
\begin{SeeAlso}\relax
plw, lmw
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}

# ------------------------------------------
# Example using the result of the analysis of
# the 6 arrays in the AffySpikeU95Subset data set

# Loading the data
data(AffySpikeU95Subset)

# Defining design and contrast matrix
group<-factor(rep(1:2,each=3))
design<-model.matrix(~group-1)
contrast<-matrix(c(1,-1),1,2)

# Analyzing using plw
model1<-plw(AffySpikeU95Subset,design=design,contrast=contrast,
            epsilon=0.01)

## Look at fitted vs observed density for log(s2)
varHistPlot(model1)

\end{ExampleCode}
\end{Examples}

