\HeaderA{bg.adjust.affinities}{Background adjustment with sequence information (internal function)}{bg.adjust.affinities}
\aliasA{bg.adjust.constant}{bg.adjust.affinities}{bg.adjust.constant}
\aliasA{bg.adjust.fullmodel}{bg.adjust.affinities}{bg.adjust.fullmodel}
\aliasA{bg.adjust.mm}{bg.adjust.affinities}{bg.adjust.mm}
\aliasA{bg.adjust.optical}{bg.adjust.affinities}{bg.adjust.optical}
\keyword{manip}{bg.adjust.affinities}
\begin{Description}\relax
An internal function to be used by \code{\LinkA{gcrma}{gcrma}}.
\end{Description}
\begin{Usage}
\begin{verbatim}
bg.adjust.fullmodel(pms,mms,ncs=NULL,apm,amm,anc=NULL,index.affinities,k=k,rho=.7,fast)
bg.adjust.affinities(pms,ncs,apm,anc,index.affinities,k=k,fast)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{pms}] PM intensities after optical background correction, before
non-specific-binding correction.
\item[\code{mms}] MM intensities after optical background correction, before
non-specific-binding correction.
\item[\code{ncs}] Negative control probe intensities after optical background correction, before
non-specific-binding correction. If \code{ncs=NULL}, the MM probes
are considered the negative control probes.
\item[\code{index.affinities}] The index of pms with known sequences. (For some types of
arrays the sequences of a small subset of probes are not provided by
Affymetrix.)
\item[\code{apm}] Probe affinities for PM probes with known sequences.
\item[\code{amm}] Probe affinities for MM probes with known sequences.
\item[\code{anc}] Probe affinities for Negative control probes with known
sequences. This is ignored when \code{ncs=NULL}.
\item[\code{rho}] correlation coefficient of log background intensity in a pair of pm/mm probes. Default=.7
\item[\code{k}] A tuning parameter. See details
\item[\code{fast}] Logical value. If \code{TRUE} a faster add-hoc algorithm is
used.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Assumes PM=background1+signal,mm=background2,
(log(background1),log(background2))' 
follow bivariate normal distribution, signal distribution follows power
law. 
\code{bg.parameters.gcrma} and \code{sg.parameters.gcrma} 
provide adhoc estimates of the parameters.

the original gcrma uses an emprical bayes estimate. this requiers a
complicated numerical integration. An add-hoc method tries to immitate
the empirical bayes estimate with a PM-B but values of PM-B<\code{k}
going to \code{k}. This can be thought as a shrunken MVUE. For more
details see Wu et al. (2003).
\end{Details}
\begin{Value}
a vector of same length as x.
\end{Value}
\begin{Author}\relax
Rafeal Irizarry, Zhijin(Jean) Wu
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{gcrma}{gcrma}}
\end{SeeAlso}


