[R] design matrix creation in R

2012-07-03 Thread mmstat
Hello, I want to create a design matrix using R. Can you explain the code which creates the following please? I understand the first part. b=g1(?) does what? dd - data.frame(a = gl(3,4), b = gl(4,1,12)) # balanced 2-way dd a b 1 1 1 2 1 2 3 1 3 4 1 4 5 2 1 6 2 2 7 2 3 8 2 4 9 3 1

Re: [R] 3-D ellipsoid equations

2011-11-05 Thread mmstat
+ Hello, The parametric equations of an ellipsoid can be written in terms of spherical coordinates. The three spherical coordinates are converted to Cartesian coordinates by X=a cos (α) sin(θ) Y=b sin(α) sin(θ) Z=c cos(θ) for α and θ The parameter α varies

[R] 3-D ellipsoid equations update2. Error message when I run R code.

2011-11-05 Thread mmstat
+ Hello, I want to delete prior questions online but am getting an error message? Please see R code in enclosed file. I don't understand the error message. The parametric equations of an ellipsoid can be written in terms of spherical coordinates. The three spherical

[R] drawing ellipses in R

2011-11-01 Thread mmstat
Hello, I have been following the thread dated Monday, October 9, 2006 when Kamila Naxerova asked a question about plotting elliptical shapes. Can you explain the equations for X and Y. I believe they used the parametric form of x and y (x=r cos(theta), y=r sin(theta). I don't know what r is

[R] extraction of element

2010-11-20 Thread mmstat
Hello, I want only the value of Beta so the statement  Power-1-Beta[1] works right. How to do?  See code below Beta - integrate(dnorm,mean=0,sd=1, 2.3552,Inf) Power- 1-Beta[1] Sincerely, Mary A. Marion __ R-help@r-project.org mailing list

[R] combining plots (curve + Plot functions)

2010-10-31 Thread mmstat
Hello,   What I really want to do is to add a rejection region in the form of a long rectangle to a density plot I have drawn.  I am getting  2 plots.  How can I add rectangle to first plot?  see code below. First section works fine.  It just is not quite what I want. # NORMAL DISTRIBUTION

Re: [R] plot pdf

2010-10-30 Thread mmstat
Subject: plot Your recent reply has got me underway.  However the savePlot command is not working.   I am following refman example. Any thoughts?  I am on a new windows 7 os.  I am not sure how to open a new device (output graphic window).  I wonder if that could be the problem? R Code

[R] plot pdf

2010-10-29 Thread mmstat
I want to plot the unstadardized version of a normal plot.  Can you explain why that is not working? Dev.set(1) xcrit=-1.645 cord.x - c(-3,seq(-3,xcrit,0.01),xcrit) cord.y - c(0,dnorm(seq(-3,xcrit,0.01)),0)            # what does final 0 do here?