[R-gregmisc-users] SF.net SVN: r-gregmisc: [954] trunk/PathwayModeling/thesispaper
Brought to you by:
warnes
From: <r_b...@us...> - 2006-04-03 15:41:45
|
Revision: 954 Author: r_burrows Date: 2006-04-03 08:41:40 -0700 (Mon, 03 Apr 2006) ViewCVS: http://svn.sourceforge.net/r-gregmisc/?rev=954&view=rev Log Message: ----------- separate pages: initial commit Added Paths: ----------- trunk/PathwayModeling/thesispaper/figure3.Snw trunk/PathwayModeling/thesispaper/figure4.Snw trunk/PathwayModeling/thesispaper/figure5.Snw trunk/PathwayModeling/thesispaper/figure6.Snw trunk/PathwayModeling/thesispaper/figure7.Snw trunk/PathwayModeling/thesispaper/figure8.Snw Added: trunk/PathwayModeling/thesispaper/figure3.Snw =================================================================== --- trunk/PathwayModeling/thesispaper/figure3.Snw (rev 0) +++ trunk/PathwayModeling/thesispaper/figure3.Snw 2006-04-03 15:41:40 UTC (rev 954) @@ -0,0 +1,18 @@ + \begin{figure} + \centering + \subfloat[1-component]{\includegraphics[scale=0.50]{figures/1comp} + \label{1comp}} + \qquad + \subfloat[all-components]{\includegraphics[scale=0.50]{figures/allcomp} + \label{allComp}} + \qquad + \subfloat[NKC]{\includegraphics[scale=0.50]{figures/nkc}\label{nkc}} + \caption[Movement of Markov chains with the + Metropolis algorithms]{Movement of Markov chains with the component-wise and + all-components Metropolis algorithms. Movement in a + 2-dimensional space is illustrated, so each point has 2 + components. The dotted lines are contours of equal probability + density for the proposal distributions and the dashed lines are + probabilty contours of the target distribution.} + \label{1comp_vs_all} + \end{figure} Added: trunk/PathwayModeling/thesispaper/figure4.Snw =================================================================== --- trunk/PathwayModeling/thesispaper/figure4.Snw (rev 0) +++ trunk/PathwayModeling/thesispaper/figure4.Snw 2006-04-03 15:41:40 UTC (rev 954) @@ -0,0 +1,40 @@ +<<fig4,echo=F,eval=F>>=3 +source("R/paperSSQ.R") +source("R/getModes.R") +source("R/do.optim.R") +source("R/plotDensities.R") +output16 <- read.table("data/output16.AllComp.thinned") +input16 <- read.table("data/input16.dat", header=T) +attach(input16) +temp<-output16[sample(1:20000,5000),] +temp2<-numeric(5000) +for (i in 1:5000) temp2[i]<-paperSSQ(temp[i,]) +temp<-temp[order(temp2),] +write.table(temp[1:4750,],file="figures/tempDir/Dsamp.dat",row.names=F,col.names=F) +mcmcML <- as.numeric(temp[1,-10]) +write.table(mcmcML,file="figures/tempDir/mcmcML.dat",row.names=F,col.names=F) +modes<-getModes(output16) +temp<-do.optim(start=modes[-10],scail=modes[-10]) +temp<-do.optim(start=temp$par,scail=temp$par) +optimML<-temp$par +write.table(optimML,file="figures/tempDir/optimML.dat",row.names=F,col.names=F) +SD <- numeric(9) +for (i in 1:9) SD[i] <- sd(output16[,i]) +pdf(file="figures/tempDir/densities.pdf",width=6,height=6) +par(mfrow=c(3,3)) +plotDensities(output16) +dev.off() +par(mfrow=c(1,1)) +detach(input16) +@ +\begin{figure} + \centering + \includegraphics[scale=0.8]{figures/tempDir/densities} + \caption[Histograms of the marginal probability distributions]{Histograms of the marginal probability distributions for + the 5-reaction model generated with the all-components Metropolis + algorithm and the 16-point dataset. The curves are normal densities with means equal to the + medians of the distributions and variances equal to the variances of + the distributions. \textit{Red vertical lines indicate the parameters values that + minimize the mean squared residuals.}} + \label{densities} +\end{figure} Added: trunk/PathwayModeling/thesispaper/figure5.Snw =================================================================== --- trunk/PathwayModeling/thesispaper/figure5.Snw (rev 0) +++ trunk/PathwayModeling/thesispaper/figure5.Snw 2006-04-03 15:41:40 UTC (rev 954) @@ -0,0 +1,22 @@ +<<fig5,echo=F,eval=F>>=4 +source("R/plotDensity.R") +source("R/plotConverged.R") +output12 <- read.table("data/output12.AllComp.thinned") +output16 <- read.table("data/output16.AllComp.thinned") +output25 <- read.table("data/output25.AllComp.thinned") +pdf(file="figures/tempDir/converged.pdf",width=6,height=6) +par(mfrow=c(3,3)) +plotConverged() +dev.off() +par(mfrow=c(1,1)) +@ +\begin{figure} + \centering + \includegraphics[scale=0.9]{figures/tempDir/converged} + \caption{\textit{Posterior distributions from different numbers} of data + points for the all-components algorithm. (---------) prior + distribution; ({\color{red} - - - -}) 12 points; ({\color{green} + $\cdots\cdots$}) 16 points; ({\color{blue} -- $\cdot$ -- $\cdot$ --}) 25 + points} + \label{converged} +\end{figure} Added: trunk/PathwayModeling/thesispaper/figure6.Snw =================================================================== --- trunk/PathwayModeling/thesispaper/figure6.Snw (rev 0) +++ trunk/PathwayModeling/thesispaper/figure6.Snw 2006-04-03 15:41:40 UTC (rev 954) @@ -0,0 +1,25 @@ +<<fig6, echo=F,eval=F>>=5 +source("R/paperPairs.R") +mcmcML <-scan("figures/tempDir/mcmcML.dat") +output16 <- read.table("data/output16.AllComp.thinned") +mcmc.cor <- function(x,y) { + par(usr=c(0,1,0,1)) + r <- cor(x,y) + txt <- format(r,digits=2) + text(0.5,0.5,txt,cex=1.4) + } +pdf(file="figures/tempDir/scatterPlot.pdf",width=8,height=8) +par(pch='.') +paperPairs(output16[sample(1:20000,2000),-10],labels=c('d1','d2','d3','d4','d5','d6','d7','d8','d9'),lower.panel=mcmc.cor) +dev.off() +par(pch=1) +@ +\begin{figure} + \centering + \includegraphics[scale=0.6]{figures/tempDir/scatterPlot} + \caption[Bivariate scatter plots of the parameter distributions]{Bivariate scatter plots of the parameter distributions for + the 5-reaction model found with the all-components Metropolis + algorithm (upper triangle); correlation coefficients (lower + triangle). The red lines indicate the maximum likelihood estimates of the parameters.} + \label{scatter} +\end{figure} Added: trunk/PathwayModeling/thesispaper/figure7.Snw =================================================================== --- trunk/PathwayModeling/thesispaper/figure7.Snw (rev 0) +++ trunk/PathwayModeling/thesispaper/figure7.Snw 2006-04-03 15:41:40 UTC (rev 954) @@ -0,0 +1,28 @@ +<<fig7, echo=F, eval=F>>=6 +source("R/paperSSQ.R") +source("R/getModes.R") +source("R/do.optim.R") +source("R/fitPaper.R") +source("R/get95CI.R") +source("R/plotVi.R") +mcmcML <-scan("figures/tempDir/mcmcML.dat") +optimML <-scan("figures/tempDir/optimML.dat") +output16 <- read.table("data/output16.AllComp.thinned") +input16 <- read.table("data/input16.dat",header=T) +attach(input16) +Dsamp <- as.matrix(read.table("figures/tempDir/Dsamp.dat")) +pdf(file="figures/tempDir/V%dfitted.pdf",onefile=FALSE,width=10,height=5.5) +plotVi(Dsamp,input16) +dev.off() +detach(input16) +@ +\begin{figure} + \centering + \subfloat[v2]{\includegraphics[scale=0.30]{figures/tempDir/V1fitted}} + \subfloat[v3]{\includegraphics[scale=0.30]{figures/tempDir/V2fitted}}\\ + \subfloat[v4]{\includegraphics[scale=0.30]{figures/tempDir/V3fitted}} + \subfloat[v5]{\includegraphics[scale=0.30]{figures/tempDir/V4fitted}} + \caption{Curves fit to the 16-point data with the all-components + algorithm. The green curves are drawn with the maximum likelihood estimates for the parameters found with the L-BFGS-B algorithm \cite{Byrd95} as implemented in the \textit{R optim()} function. } + \label{fits} +\end{figure} Added: trunk/PathwayModeling/thesispaper/figure8.Snw =================================================================== --- trunk/PathwayModeling/thesispaper/figure8.Snw (rev 0) +++ trunk/PathwayModeling/thesispaper/figure8.Snw 2006-04-03 15:41:40 UTC (rev 954) @@ -0,0 +1,25 @@ +<<fig8, echo=F,eval=F>>=7 +source("R/getMSDvsEvals.R") +source("R/plotMSD16.R") +source('R/paperSSQ.R') +input16 <- read.table('data/input16.dat',header=T) +attach(input16) +OneComp.MSD.dat <- read.table("data/1comp.MSD.dat") +AllComp.MSD.dat <- read.table("data/AllComp.MSD.dat") +for (i in 1:10) { +file <- sub('#',as.character(i),'NKC.MSD.dat#') +assign(file, read.table(paste("data/",file,sep=""))) +} +pdf(file="figures/tempDir/MSR16.pdf",width=9,height=6) +plotMSD16() +dev.off() +detach(input16) +@ +\begin{figure} + \centering + \includegraphics[scale=0.5]{figures/tempDir/MSR16} + \caption[Mean squared residuals vs. number of likelihood + evaluations]{Mean squared residuals vs. number of likelihood + evaluations for the 5-reaction model} + \label{SSQvsIter} +\end{figure} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |