3 %- Also NEED an '\alias' for EACH other topic documented here.
5 %% ~~function to do ... ~~
6 Fit the mean-var relationship using polynomial regression
9 %% ~~ A concise (1-5 lines) description of what the function does. ~~
12 PolyFitPlot(X, Y, nterms, xname = "Estimated Mean", yname = "Estimated Var", pdfname = "", xlim = c(-1,5), ylim = c(-1,7), ChangeXY = F, col = "red")
14 %- maybe also 'usage' for other objects documented here.
17 The first group of values want to be fitted by the polynomial regression. ( e.g Mean of the data. )
20 The second group of values want to be fitted by the polynomial regression. ( e.g. variance of the data.) The length of Y should be the same as the length of X.
23 How many polynomial terms want to be used.
35 The x limits of the plot.
38 The y limits of the plot.
42 If ChangeXY is setted to be TRUE, X will be treated as the dependent variable and Y will be treated as the independent one. Default is FALSE.
45 Color of the fitted line.
49 %% ~~ If necessary, more details than the description above ~~
52 The PolyFitPlot function provides a smooth scatter plot of two variables and their best fitting line of polynomial regression.
53 %% ~Describe the value returned
54 %% If it is a LIST, use
55 %% \item{comp1 }{Description of 'comp1'}
56 %% \item{comp2 }{Description of 'comp2'}
60 %% ~put references to the literature/web site here ~
69 %% ~Make other sections like Warning with \section{Warning }{....} ~
72 %% ~~objects to See Also as \code{\link{help}}, ~~~
75 GeneData=GeneSimu(DVDconstant=4, DVDqt1=NULL, DVDqt2=NULL, Conditions=rep(c(1,2),each=5), NumofSample=10, NumofGene=10000, DEGeneProp=.1, Phiconstant=NULL, Phi.qt1=.25, Phi.qt2=.75, Meanconstant=NULL, OnlyData="Y")
77 EBres=NBBetaEB.bias.uniqueP_PoolVarSpeedUp_MDFPoi(Data=GeneData,NgVector=rep(1,10^4), Vect5End=rep(1,10^4), Vect3End=rep(1,10^4), Conditions=as.factor(rep(c(1,2),each=5)), maxround=5)
79 poly=PolyFitPlot(X=EBres$MeanList[[1]], Y=EBres$PoolVar[[1]], nterms=5, xname = "mean", yname = "var", pdfname=NULL, xlim = c(0,4.5),ylim = c(-2,8), ChangeXY = F, col = "red")
81 % Add one or more standard keywords, see file 'KEYWORDS' in the
82 % R documentation directory.
84 \keyword{ ~kwd2 }% __ONLY ONE__ keyword per line