[R] Questons about R capabilities

Duncan Murdoch murdoch at stats.uwo.ca
Tue May 6 22:19:01 CEST 2003


On Tue, 06 May 2003 15:27:20 -0400, you wrote in message
<seb7d46c.048 at healthsmtp.nycnet>:

> 
>  Hello,
> 
>1)  I am interested in performing a limited-dependent variable linear regression.  By this I mean a classical linear regression, but for the case where the values of the dependent variable cannot vary from -infinity to +infinity, but are truncated and so are between two finite limits L1 and L2.  Does R1.7 have this capability?  If so what is (are) the relevant command(s)?

I don't think that's built in, but it's always worth looking at the
contributed packages on cran.r-project.org just in case.  There are
general purpose likelihood maximizers (nlm, optim).
 
>2)  I am also interested in sampling from a multivariate normal distribution.  I see that R has a command mvrnorm, but when I try to use it, I get a message to the effect that the command is not recognized.  Is there something I must do to enable this command, or is it not available in version 1.7?

When the help says "mvrnorm(MASS)", that means that the function is in
the package called "MASS".  You need to execute

 library(MASS)

to get that function loaded onto the search path.  You can see which
packages are already there by executing

 search()

Duncan Murdoch




More information about the R-help mailing list