[R] How to add values on the axes of the 3D bi-variable lrm fit?

Spencer Graves spencer.graves at pdf.com
Sat Aug 27 04:55:19 CEST 2005


	  I have not seen a reply to this, so I will offer a few comments.

	  1.  I haven't used "lrm", but I assume you are referring to the copy 
in the "Design" package;  I surmised that from reviewing 
RSiteSearch("lrm").

	  2.  I installed "Design" and learned that I also needed "Hmisc, so I 
installed that also.  The example you provided was not complete in 
itself, so that presented another obstacle to helping you.  I therefore 
worked through examples with the documentation for "lrm", from which I 
learned that your "fit" was of class "Design".

	  3.  The led me to the documentation for "plot.Design".  The examples 
there included one that produced a perspective plot.

	  4.  I then read the documentation for "persp" and learned that it had 
an argument 'ticktype' with a nondefault value of "detailed", which 
should produce what you want.

	  5.  When I added 'ticktype="detailed"' to the call to "plot", I got 
an error message.  I then started reading the code for "plot.Design" and 
learned that it had an argument 'perspArgs'.  The documentation for 
"plot.Design" told me that was "a list containing other named arguments 
to be passed to 'persp'".  I tried that and it worked.

	  6.  In the future, I believe you can increase your chances of getting 
a useful reply quickly if you PLEASE do read and follow the posting 
guide! "http://www.R-project.org/posting-guide.html".

	  Best Wishes,
	  spencer graves

Jan Verbesselt wrote:

>  
> 
> Dear r-list,
> 
>  
> 
> When I try to plot the following 3D lrm fit I obtain only arrows with labels
> on the three axes of the figure (without values).
> 
>  
> 
> fit <- lrm(y ~ rcs(x1,knots)+rcs(x2,knots), tol=1e-14,X=T,Y=T)
> 
> dd <- datadist(x1,x2);options(datadist='dd');
> 
> par(mfrow=c(1,1))
> 
> plot(fit,x1=NA, x2=NA, theta=50,phi=25)
> 
>  
> 
> How can I add values to the axes of this plot?  (axes with the range of
> values of each of the explanatory variables x1&x2)
> 
>  
> 
> Thanks,
> 
> Jan
> 
>  
> 
>  
> 
> _______________________________________________________________________
> Ir. Jan Verbesselt
> Research Associate
> Group of Geomatics Engineering
> Department Biosystems ~ M³-BIORES
> Vital Decosterstraat 102, 3000 Leuven, Belgium
> Tel: +32-16-329750   Fax: +32-16-329760
> http://gloveg.kuleuven.ac.be/
> _______________________________________________________________________
> 
>  
> 
> 
> 	[[alternative HTML version deleted]]
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

-- 
Spencer Graves, PhD
Senior Development Engineer
PDF Solutions, Inc.
333 West San Carlos Street Suite 700
San Jose, CA 95110, USA

spencer.graves at pdf.com
www.pdf.com <http://www.pdf.com>
Tel:  408-938-4420
Fax: 408-280-7915




More information about the R-help mailing list