[R] Ploting betas and p-values together

Gregor Gawron gregor.gawron at rmf.ch
Fri Jun 7 16:57:57 CEST 2002


Hi all,

I have a data frame consisting of extracted results from a moving
regression. Next, I want to write a function that pick up the desired
coefficient columns and plots them on one page (about=5). Additionaly,
the plots should display the corresponding p-values.  As for the
coefficients alone, it works fine. The problems arise when I try to add
the values of p-values as lines. 
An example: 

Y<-data.frame  # 10 rows and columns of alfas,5 betas, p-values, etc.
z<-1:10
par(mfrow=c(3,2))
	for (i in 10:ncol(Y)){
	plot(z,Y[,i],type="b")	#plots the coefficients
	}
		for (j in 1:ncol(Y)-10){ #
		lines(Y[,j])
	}

I've tried with different positions of loops but received either all
lines in one graph or the same line in all graphs. Are they some ways to
solve it or maybe any function à la `merge.plot'? 
Thanks in advance.

---

Gregor Gawron

 
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list