Re: [R] Hunting for snow...

2006-07-09 Thread Prof Brian Ripley
On Sat, 8 Jul 2006, Brian Lunergan wrote:

 Evening folks:

 I did an install.views of finance and econometrics and between the two of
 them R reported 'FracSim', 'RDCOMClient', 'snow', 'VGAM', and 'segmented'
 as missing dependencies. Now, I've managed to hunt down what appear to be
 current zip file copies of all of the packages but 'snow'. Is there a
 windows edition of the package out there someplace that will get along with
 R v2.3.1 and if so, how do I find it?

 Please and thanks...

PLEASE read the README:

http://cran.r-project.org/bin/windows/contrib/2.3/@ReadMe

and see the check summary at

http://cran.r-project.org/bin/windows/contrib/checkSummaryWin.html

snow runs distributed R tasks across hosts: it has three modes and
prefers PVM and MPI if packages rpvm or Rmpi are available (which they are 
not for Windows).  As a result only some of its functionality can be used 
on Windows, and anyone who is going to get involved at that level of 
programming will very easily install the package from the sources.

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-help@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


Re: [R] last 2 questions about save and load

2006-07-09 Thread Prof Brian Ripley
On Sat, 8 Jul 2006, [EMAIL PROTECTED] wrote:

 i played around and i get the hang of save and load. I just
 have two final questions :

 1) is loading the RandomFields package the only
 way to check if a file ( created through the save function )
 is out there or not ? Because, I generally won't know if one has
 been created yet or not.

Of course not: See ?file.exists and ?file.info.  (RandomFields::FileExists 
itself depends on file.exists and has a different purpose.)

 2) Suppose, you have the case where you
 created and saved a file. When you do an ls()
 without loading that file, it doesn't show up in the list
 obviously. So, if you want to delete that file for whatever
 reason, is it possible ? Thanks.

ls() returns a list of (some) R objects: it has nothing to do with files.
Now save()d files contain images of R objects, but the name of the file 
has nothing to do with the names of the object(s) it contains.

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-help@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


Re: [R] Hunting for snow...

2006-07-09 Thread Brian Lunergan
Prof Brian Ripley wrote:
 On Sat, 8 Jul 2006, Brian Lunergan wrote:
 
 Evening folks:

 I did an install.views of finance and econometrics and between the two of
 them R reported 'FracSim', 'RDCOMClient', 'snow', 'VGAM', and 'segmented'
 as missing dependencies. Now, I've managed to hunt down what appear to be
 current zip file copies of all of the packages but 'snow'. Is there a
 windows edition of the package out there someplace that will get along 
 with
 R v2.3.1 and if so, how do I find it?

 Please and thanks...
 
 PLEASE read the README:
 
 http://cran.r-project.org/bin/windows/contrib/2.3/@ReadMe
 
 and see the check summary at
 
 http://cran.r-project.org/bin/windows/contrib/checkSummaryWin.html
 
 snow runs distributed R tasks across hosts: it has three modes and
 prefers PVM and MPI if packages rpvm or Rmpi are available (which they 
 are not for Windows).  As a result only some of its functionality can be 
 used on Windows, and anyone who is going to get involved at that level 
 of programming will very easily install the package from the sources.
 
Let me see if I understand this correctly. Something in the finance task 
view would seem to consider snow a dependency; however, the package in 
question has dragged it along for the ride into Windows, crippling its 
usefulness.

Problem and a question. Having checked the file on the UofT CRAN mirror 
that lists dependencies for the available files snow only appears attached 
to three of them, none of which are listed as part the finance view or 
anything I already have on my system. What is R seeing these as a 
dependency for then? Perhaps the view maintainers can suggest something? If 
it is not available for windows and is only partially functional there can 
it be safely ignored as a dependency?

One other puzzle resulting from this. The check summary suggested problems 
with 'FracSim', 'RDCOMClient', 'VGAM', and 'segmented' as windows packages 
but yet the versions I found seemed to install without complaint onto my 
system. Three gave back the successful unpack msg. VGAM did not, but 
several of the demo scripts ran without complaint so I am assuming it is 
comfortable with v2.3.1 on a windows system. Later versions of the four 
than were tested in the check summary, perhaps?

-- 
Brian Lunergan
Nepean, Ontario
Canada


---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 0627-3, 2006-07-07
Tested on: 2006-07-09 07:39:36
avast! is copyright (c) 2000-2006 ALWIL Software.
http://www.avast.com

__
R-help@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


[R] R

2006-07-09 Thread zana adeb
Madame,
   
  I've read your answer for using R from Java, you've sais: 
  one is to use R in batch mode ie you create a file in your java code 
with all the R commands and send it to R (via Process 
pc=Runtime.getRuntime().exec(Rcall); )and then R creates an outputfile 
with all the results.
  My question is how to do a process in Java and do I need to change the path 
of Java or R to let Java call R, What configuration should I do???
  and Do I need to add somehting to a Java program ???
  Thank you in advance
   
  Xena



-

[[alternative HTML version deleted]]

__
R-help@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


Re: [R] Hunting for snow...

2006-07-09 Thread Duncan Murdoch
On 7/9/2006 7:39 AM, Brian Lunergan wrote:
 Prof Brian Ripley wrote:
 On Sat, 8 Jul 2006, Brian Lunergan wrote:

 Evening folks:

 I did an install.views of finance and econometrics and between the two of
 them R reported 'FracSim', 'RDCOMClient', 'snow', 'VGAM', and 'segmented'
 as missing dependencies. Now, I've managed to hunt down what appear to be
 current zip file copies of all of the packages but 'snow'. Is there a
 windows edition of the package out there someplace that will get along 
 with
 R v2.3.1 and if so, how do I find it?

 Please and thanks...
 PLEASE read the README:

 http://cran.r-project.org/bin/windows/contrib/2.3/@ReadMe

 and see the check summary at

 http://cran.r-project.org/bin/windows/contrib/checkSummaryWin.html

 snow runs distributed R tasks across hosts: it has three modes and
 prefers PVM and MPI if packages rpvm or Rmpi are available (which they 
 are not for Windows).  As a result only some of its functionality can be 
 used on Windows, and anyone who is going to get involved at that level 
 of programming will very easily install the package from the sources.

 Let me see if I understand this correctly. Something in the finance task 
 view would seem to consider snow a dependency; however, the package in 
 question has dragged it along for the ride into Windows, crippling its 
 usefulness.
 
 Problem and a question. Having checked the file on the UofT CRAN mirror 
 that lists dependencies for the available files snow only appears attached 
 to three of them, none of which are listed as part the finance view or 
 anything I already have on my system. What is R seeing these as a 
 dependency for then? Perhaps the view maintainers can suggest something? If 
 it is not available for windows and is only partially functional there can 
 it be safely ignored as a dependency?
 
 One other puzzle resulting from this. The check summary suggested problems 
 with 'FracSim', 'RDCOMClient', 'VGAM', and 'segmented' as windows packages 
 but yet the versions I found seemed to install without complaint onto my 
 system. Three gave back the successful unpack msg. VGAM did not, but 
 several of the demo scripts ran without complaint so I am assuming it is 
 comfortable with v2.3.1 on a windows system. Later versions of the four 
 than were tested in the check summary, perhaps?

The check summary does more stringent tests than just installing the 
package.  It checks whether the examples will run, and, if the package 
author supplies some tests, checks that test results match expected results.

For example, in the case of FracSim, the error occurred when trying to 
run the fracsim.1d example.  Apparently the example gave no finite 
values so plot() couldn't set up a coordinate system.  (You can see this 
if you click on the ERROR link in the summary.)

Since this appears to be doing random number generation, it may just be 
that the seed was set to a particularly unlucky value.  But the code 
does assume that no such unlucky values exist...

Duncan Murdoch

__
R-help@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


Re: [R] Hunting for snow...

2006-07-09 Thread Uwe Ligges
Brian Lunergan wrote:
 Prof Brian Ripley wrote:
 On Sat, 8 Jul 2006, Brian Lunergan wrote:

 Evening folks:

 I did an install.views of finance and econometrics and between the two of
 them R reported 'FracSim', 'RDCOMClient', 'snow', 'VGAM', and 'segmented'
 as missing dependencies. Now, I've managed to hunt down what appear to be
 current zip file copies of all of the packages but 'snow'. Is there a
 windows edition of the package out there someplace that will get along 
 with
 R v2.3.1 and if so, how do I find it?

 Please and thanks...
 PLEASE read the README:

 http://cran.r-project.org/bin/windows/contrib/2.3/@ReadMe

 and see the check summary at

 http://cran.r-project.org/bin/windows/contrib/checkSummaryWin.html

 snow runs distributed R tasks across hosts: it has three modes and
 prefers PVM and MPI if packages rpvm or Rmpi are available (which they 
 are not for Windows).  As a result only some of its functionality can be 
 used on Windows, and anyone who is going to get involved at that level 
 of programming will very easily install the package from the sources.

 Let me see if I understand this correctly. Something in the finance task 
 view would seem to consider snow a dependency; however, the package in 
 question has dragged it along for the ride into Windows, crippling its 
 usefulness.
 
 Problem and a question. Having checked the file on the UofT CRAN mirror 
 that lists dependencies for the available files snow only appears attached 
 to three of them, none of which are listed as part the finance view or 
 anything I already have on my system. What is R seeing these as a 
 dependency for then? Perhaps the view maintainers can suggest something? If 
 it is not available for windows and is only partially functional there can 
 it be safely ignored as a dependency?
 
 One other puzzle resulting from this. The check summary suggested problems 
 with 'FracSim', 'RDCOMClient', 'VGAM', and 'segmented' as windows packages 
 but yet the versions I found seemed to install without complaint onto my 

Where did you find them? At least not in their current versions on the 
official repository on CRAN master for R-2.3.x, I hope.


 system. Three gave back the successful unpack msg. VGAM did not, but 
 several of the demo scripts ran without complaint so I am assuming it is 
 comfortable with v2.3.1 on a windows system. Later versions of the four 
 than were tested in the check summary, perhaps?

The check summary is recent. I can only imagine that you found earlier 
versions...

Uwe Ligges

__
R-help@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


[R] help on executing JRClient examples

2006-07-09 Thread zana adeb
Dear All,
   
  I've installed Rserve and I've met in the bin directory of R and I've runn it 
and it  appears //ready to answer the querie// and i've installed the Jrclient 
and I've put it on the desktop in the directory Jrclient and i've installed JDK 
and sur I'have the R language.
  Now when I compile the Jrclient exeamples : I've opened the concole commande 
and I tape : javac c:\\Jrclient\examples\tt.java,but
  an error appreas: package org.rosuda.JRclient does not exist , I think that I 
should change the path of somthing but I don't know what, I'm beginner and 
there is no steps how to apply the examples...
  could you please help me?? I need the R language from Java..
   
  Thank you in advance


-


[[alternative HTML version deleted]]

__
R-help@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


Re: [R] Hunting for snow...

2006-07-09 Thread Brian Lunergan
Uwe Ligges wrote:
 Brian Lunergan wrote:
 Prof Brian Ripley wrote:
 On Sat, 8 Jul 2006, Brian Lunergan wrote:

 Evening folks:

 I did an install.views of finance and econometrics and between the 
 two of
 them R reported 'FracSim', 'RDCOMClient', 'snow', 'VGAM', and 
 'segmented'
 as missing dependencies. Now, I've managed to hunt down what appear 
 to be
 current zip file copies of all of the packages but 'snow'. Is there a
 windows edition of the package out there someplace that will get 
 along with
 R v2.3.1 and if so, how do I find it?

 Please and thanks...
 PLEASE read the README:

 http://cran.r-project.org/bin/windows/contrib/2.3/@ReadMe

 and see the check summary at

 http://cran.r-project.org/bin/windows/contrib/checkSummaryWin.html

 snow runs distributed R tasks across hosts: it has three modes and
 prefers PVM and MPI if packages rpvm or Rmpi are available (which 
 they are not for Windows).  As a result only some of its 
 functionality can be used on Windows, and anyone who is going to get 
 involved at that level of programming will very easily install the 
 package from the sources.

 Let me see if I understand this correctly. Something in the finance 
 task view would seem to consider snow a dependency; however, the 
 package in question has dragged it along for the ride into Windows, 
 crippling its usefulness.

 Problem and a question. Having checked the file on the UofT CRAN 
 mirror that lists dependencies for the available files snow only 
 appears attached to three of them, none of which are listed as part 
 the finance view or anything I already have on my system. What is R 
 seeing these as a dependency for then? Perhaps the view maintainers 
 can suggest something? If it is not available for windows and is only 
 partially functional there can it be safely ignored as a dependency?

 One other puzzle resulting from this. The check summary suggested 
 problems with 'FracSim', 'RDCOMClient', 'VGAM', and 'segmented' as 
 windows packages but yet the versions I found seemed to install 
 without complaint onto my 
 
 Where did you find them? At least not in their current versions on the 
 official repository on CRAN master for R-2.3.x, I hope.

FracSim_0.2.zip
http://cran.stat.ucla.edu/bin/windows/contrib/2.3/

RDCOMClient_0.91-0.zip
http://www.omegahat.org/R/bin/windows/contrib/R-2.3.0/

segmented_0.1-4.zip
http://cran.r-project.org/bin/windows/contrib/2.1/

VGAM_0.6-9.zip
http://www.stat.auckland.ac.nz/~yee/bin/windows/contrib/2.3/

These are the versions I found and the locations. Other than perhaps 
segmented all seem to be positioned as compatible with v2.3.x, but I own 
that I could be incorrect in my assessment of the situation.

 system. Three gave back the successful unpack msg. VGAM did not, but 
 several of the demo scripts ran without complaint so I am assuming it 
 is comfortable with v2.3.1 on a windows system. Later versions of the 
 four than were tested in the check summary, perhaps?
 
 The check summary is recent. I can only imagine that you found earlier 
 versions...

-- 
Brian Lunergan
Nepean, Ontario
Canada


---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 0627-3, 2006-07-07
Tested on: 2006-07-09 09:34:29
avast! is copyright (c) 2000-2006 ALWIL Software.
http://www.avast.com

__
R-help@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


Re: [R] Hunting for snow...

2006-07-09 Thread Uwe Ligges
Brian Lunergan wrote:
 Uwe Ligges wrote:
 Brian Lunergan wrote:
 Prof Brian Ripley wrote:
 On Sat, 8 Jul 2006, Brian Lunergan wrote:

 Evening folks:

 I did an install.views of finance and econometrics and between the 
 two of
 them R reported 'FracSim', 'RDCOMClient', 'snow', 'VGAM', and 
 'segmented'
 as missing dependencies. Now, I've managed to hunt down what appear 
 to be
 current zip file copies of all of the packages but 'snow'. Is there a
 windows edition of the package out there someplace that will get 
 along with
 R v2.3.1 and if so, how do I find it?

 Please and thanks...
 PLEASE read the README:

 http://cran.r-project.org/bin/windows/contrib/2.3/@ReadMe

 and see the check summary at

 http://cran.r-project.org/bin/windows/contrib/checkSummaryWin.html

 snow runs distributed R tasks across hosts: it has three modes and
 prefers PVM and MPI if packages rpvm or Rmpi are available (which 
 they are not for Windows).  As a result only some of its 
 functionality can be used on Windows, and anyone who is going to get 
 involved at that level of programming will very easily install the 
 package from the sources.

 Let me see if I understand this correctly. Something in the finance 
 task view would seem to consider snow a dependency; however, the 
 package in question has dragged it along for the ride into Windows, 
 crippling its usefulness.

 Problem and a question. Having checked the file on the UofT CRAN 
 mirror that lists dependencies for the available files snow only 
 appears attached to three of them, none of which are listed as part 
 the finance view or anything I already have on my system. What is R 
 seeing these as a dependency for then? Perhaps the view maintainers 
 can suggest something? If it is not available for windows and is only 
 partially functional there can it be safely ignored as a dependency?

 One other puzzle resulting from this. The check summary suggested 
 problems with 'FracSim', 'RDCOMClient', 'VGAM', and 'segmented' as 
 windows packages but yet the versions I found seemed to install 
 without complaint onto my 

 Where did you find them? At least not in their current versions on the 
 official repository on CRAN master for R-2.3.x, I hope.
 
 FracSim_0.2.zip
 http://cran.stat.ucla.edu/bin/windows/contrib/2.3/
 
 RDCOMClient_0.91-0.zip
 http://www.omegahat.org/R/bin/windows/contrib/R-2.3.0/
 
 segmented_0.1-4.zip
 http://cran.r-project.org/bin/windows/contrib/2.1/
 
 VGAM_0.6-9.zip
 http://www.stat.auckland.ac.nz/~yee/bin/windows/contrib/2.3/

None of them is on CRAN master:

- RDCOMClient is on Omegahat
- segmented is CRAN but outdated for R-2.1.x
- VGAM is in a private repository
- FracSim: I cannot access
http://cran.stat.ucla.edu/bin/windows/contrib/2.3/
right now, but I guess it does not sync properly. At least, the package 
should not be there.

Uwe Ligges


 These are the versions I found and the locations. Other than perhaps 
 segmented all seem to be positioned as compatible with v2.3.x, but I own 
 that I could be incorrect in my assessment of the situation.
 
 system. Three gave back the successful unpack msg. VGAM did not, but 
 several of the demo scripts ran without complaint so I am assuming it 
 is comfortable with v2.3.1 on a windows system. Later versions of the 
 four than were tested in the check summary, perhaps?

 The check summary is recent. I can only imagine that you found earlier 
 versions...


__
R-help@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


[R] KS Test Warning Message

2006-07-09 Thread justin rapp
All,

Happy World Cup and Wimbledon.   This morning finds me with the first
of my many daily questions.

I am running a ks.test on residuals obtained from a regression model.

I use this code:
 ks.test(Year5.lm$residuals,pnorm)

and obtain this output
One-sample Kolmogorov-Smirnov test

data:  Year5.lm$residuals
D = 0.7196, p-value  2.2e-16
alternative hypothesis: two.sided

Warning message:
cannot compute correct p-values with ties in: ks.test(Year5.lm$residuals, pnorm)

I am wondering if anybody can tell me what this error message means.

Also, could anybody clarify how I could have a regression model with a
high Rsquared, rouglhy .67, but with nonnormal residuals?  Does this
take away from the validity of my model?

jdr

__
R-help@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


Re: [R] Problem with garchFit function in fSeries

2006-07-09 Thread Spencer Graves
  Without a self-contained example, it's difficult to say for sure. 
However, this looks to me like false convergence:  garchFit uses a 
nonlinear iteration to try to maximize the likelihood by minimizing 
(-log(likelihood)).  The matrix of second partial derivatives of 
(-log(likelihood)) provide an approximation to the covariance matrix of 
the parameter estimates.  If it stops before appropriate convergence, 
some of the diagonal elements of this matrix might be negative.  When I 
listed 'garchFit' just now, I found that the line before the one 
generating your warning was as follows:

fit$cvar = solve(fit$hessian)

This seems consistent with what I just said.

  If you want to try to get around this, I suggest you start by 
focusing on the argument 'control' mentioned on the help page for 
'garchFit'.  If you follow that through the help pages for 'nlminb' and 
'optim', plus possibly 'demo/xmpDWChapter34.R' mentioned in the 
examples, I believe you will likely find a way to get around that.

  First, however, I suggest you plot the data series and take a careful 
look at it, if you haven't already.

  Also, you say it worked fine for you with only 1000 of the 1600 
observations.  Was that observations 1:1000 of this same series?  If 
yes, did you try also observations 601:1600?  I just wonder if the data 
in the last 600 observations behave rather differently from the first 
1000?

  Hope this helps.
  Spencer Graves
p.s.  If you'd like further assistance from the listserve, please submit 
another post.  Before you do, however, I suggest you read the posting 
guide! www.R-project.org/posting-guide.html, especially the part about 
including a simple, self-contained example.  I would NOT recommend you 
include 1600 observations in an email like this.  However, with common R 
download commands, you might be able to describe in a couple of commands 
how to get the data, then how you subsetted it, etc.

Ivan Kalafatic wrote:
 I used garchFit function to fit 1600 observations of EURO/USD 2-day returns
 in GARCH(1,1) model.
 As part of the summary I got warning message:
 NaNs produced in: sqrt(diag(fit$cvar))
 
 And didn't get any estimates for 3 params' std.error, t value or
 probability:
 
 Error Analysis:
 Estimate  Std. Error  t value Pr(|t|)
 mu -0.0048270.020141   -0.2400.811
 ar1 0.0103110.0269780.3820.702
 omega   0.073813  NA   NA   NA
 alpha1  0.10  NA   NA   NA
 beta1   0.80  NA   NA   NA
 
 When I reduced the sample size to 1000 observations output was ok.
 Can anyone help? What does this mean? What can be the cause of NA values?
 
 Thank you,
 Ivan
 
   [[alternative HTML version deleted]]
 
 __
 R-help@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

__
R-help@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


Re: [R] package:Matrix handling of data with identical indices

2006-07-09 Thread Douglas Bates
The apparent contradiction here is again a case of inadequate
documentation and checking.

Because the order of the triplets in the triplet form of a sparse
matrix is essentially random it is permissible to have repeated
indices.  As you have seen, the interpretation of repeated indices is
that the value at any index is the sum of the values in the triplets
corresponding to that index.

 It is not permissible to have repeated indices in the compressed
form.  In the compressed form there is a well-defined ordering of the
indices, first by columns then by row within column and the row
indices must be increasing within columns.

Your matrix Mc should be flagged as invalid.  Martin and I should
discuss whether we want to add such a test to the validity method.  It
is not difficult to add the test but there will be a penalty in that
it will slow down all operations on such matrices and I'm not sure if
we want to pay that price to catch a rather infrequently occuring
problem.

There is some documentation of the internal representations of these
formats in the directory $R_LIB/Matrix/doc/UFSparse/.  The User Guides
in that directory are taken directly from the various sparse matrix
packages that Tim Davis at the University of Florida has written.  He
has a book that is scheduled for publication this  September

Tim Davis (2006), Direct Methods for Sparse Linear Systems, SIAM,
Philadelphia, PA

I hope we will be able to refer to that book for details of the
representation and algorithms.

On 7/8/06, Thaden, John J [EMAIL PROTECTED] wrote:
 In the Matrix package v. 0.995-11 I see that the dgTMatrix
 Class for compressed, sparse, triplet-form matrices handles
 Identically indexed data instances by summing their values,
 e.g.,

 library(Matrix)
 (Mt - new(dgTMatrix,
i = as.integer(c(0,0,1,1,4)),
j = as.integer(c(0,1,2,2,4)),
x = as.double(1:5),
Dim = as.integer(c(5,5
 ## 5 x 5 sparse Matrix of class dgTMatrix
 ## [1,] 1 2 . . .
 ## [2,] . . 7 . .--- 7 = 3 + 4.
 ## [3,] . . . . .
 ## [4,] . . . . .
 ## [5,] . . . . 5

 # If instead I make a dgCMatrix-class matrix, the first
 # instance is overwritten by the second, e.g.,

 library(Matrix)
 (Mc - new(dgCMatrix,
i = as.integer(c(0,0,1,1,4)),
p = as.integer(c(0,1,2,4,5)),
x = as.double(1:5),
Dim = as.integer(c(5,5
 ## 5 x 5 sparse Matrix of class dgCMatrix
 ##
 ## [1,] 1 2 . .
 ## [2,] . . 4 .   -- the datum '3' has been lost.
 ## [3,] . . . .
 ## [4,] . . . .
 ## [5,] . . . 5

 # If one arrives at the dgCMatrix via the dgTMatrix class,
 # the summed value is of course preserved, e.g.,

 (Mtc - as(Mt, dgCMatrix))
 ## 5 x 5 sparse Matrix of class dgCMatrix
 ##
 ## [1,] 1 2 . . .
 ## [2,] . . 7 . .
 ## [3,] . . . . .
 ## [4,] . . . . .
 ## [5,] . . . . 5

 As there is nothing inherent in either compressed, sparse,
 format that would prevent recognition and handling of
 duplicated index pairs, I'm curious why the dgCMatrix
 class doesn't also add x values in those instances?
 I wonder also if others might benefit also by being able
 to choose how these instances are handled, i.e.,
 whether they are summed, averaged or overwritten?

 -John Thaden, Ph.D.
 Research Assistant Professor of Geriatrics
 University of Arkansas for Medical Sciences
 Little Rock AR, USA


 Confidentiality Notice: This e-mail message, including any attachments, is 
 for the sole use of the intended recipient(s) and may contain confidential 
 and privileged information.  Any unauthorized review, use, disclosure or 
 distribution is prohibited.  If you are not the intended recipient, please 
 contact the sender by reply e-mail and destroy all copies of the original 
 message.



__
R-help@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


Re: [R] denominator degrees of freedom and F-values in nlme

2006-07-09 Thread Douglas Bates
On 7/8/06, M R Robinson [EMAIL PROTECTED] wrote:
 Hello,

 I am struggling to understand how denominator degrees of freedom and
 subsequent significance testing based upon them works in nlme models.

 I have a data set of 736 measurements (weight), taken within 3
 different age groups, on 497 individuals who fall into two
 morphological catagories (horn types).

 My model is:  Y ~ weight + horn type / age group, random=~1|individual

 I am modeling this using glmm.PQL function with family=neg.bin
 (negative binomial distribution, estimating theta based upon a glm
 without individual as a random effect). My data set will not be
 balanced, with varying numbers of measurements taken on different
 individuals and some individuals have no weight measures just a
 morphological type.

 My output:
   denDFnumberdf
 Intercept 495
 weight232   1
 horn type 495   1
 horn type:age 232   4

 So my question is where do these denDF come from and how are they
 calculated? I wish to then test significane of these fixed effects and
 can get F-ratio's and P-values but are these appropriate?

The algorithm for calculating those denominator degrees of freedom is
given in Chapter 2 of Pinheiro and Bates (2000), Mixed-effects Models
in S and S-PLUS, Springer.  It was designed to reproduce the results
of the BETWEENWITHIN option in SAS PROC MIXED.  On looking at that
algorithm recently I no longer feel that it is a good way of doing the
calculation but I don't have a better alternative at present.

Also, that algorithm and the use of the F test is suggested for linear
mixed models.  I'm not sure that it would apply out of the box to a
generalized liner mixed model, which is what you are fitting here.
However, for practical purposes you could assume a worst case of 232
denominator degrees of freedom for all terms because there is so
little difference between an F statistic with 232 denominator degrees
of freedom and one with  495 denominator degrees of freedom.

 Thank-you for your time.
 Kind regards
 Matthew

 *
 Matt Robinson

 Institute of Evolutionary Biology
 Room 413, Ashworth Labs,
 King's Buildings,
 University of Edinburgh
 EH9 3JT, UK

 Tel: 0131 650 5990

 __
 R-help@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


__
R-help@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


[R] string problems with \\ (Windows)

2006-07-09 Thread Charles Annis, P.E.
Greetings, R-ians:

I'm using R 2.3.1 on WindowsXP.

I need to find the name of a file at the end of a sting that contains the
path + file, with the problematic \\ as separators. 

The string looks something like this:

C:\\Documents and Settings\\myName\\My Documents\\R
Projects\\Project1\\file.name.csv

What I want is file.name.csv

Currently I use the name of the project as the splitter in

strsplit(string.name, split=Project1, extended = FALSE)

This works, of course, but I won't always be using folder Project1, so I
need a more universal way to find the name of a file at the end of a string
with \\ separators.

Can I get there from here?  (I've looked through previous R-help listing of
similar problems but if it's there, I missed it.)

Thanks.


Charles Annis, P.E.

[EMAIL PROTECTED]
phone: 561-352-9699
eFax:  614-455-3265
http://www.StatisticalEngineering.com
 

__
R-help@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


Re: [R] string problems with \\ (Windows)

2006-07-09 Thread Gabor Grothendieck
Try:

basename(string.name)


On 7/9/06, Charles Annis, P.E. [EMAIL PROTECTED] wrote:
 Greetings, R-ians:

 I'm using R 2.3.1 on WindowsXP.

 I need to find the name of a file at the end of a sting that contains the
 path + file, with the problematic \\ as separators.

 The string looks something like this:

 C:\\Documents and Settings\\myName\\My Documents\\R
 Projects\\Project1\\file.name.csv

 What I want is file.name.csv

 Currently I use the name of the project as the splitter in

 strsplit(string.name, split=Project1, extended = FALSE)

 This works, of course, but I won't always be using folder Project1, so I
 need a more universal way to find the name of a file at the end of a string
 with \\ separators.

 Can I get there from here?  (I've looked through previous R-help listing of
 similar problems but if it's there, I missed it.)

 Thanks.


 Charles Annis, P.E.

 [EMAIL PROTECTED]
 phone: 561-352-9699
 eFax: 614-455-3265
 http://www.StatisticalEngineering.com


 __
 R-help@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


__
R-help@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


Re: [R] string problems with \\ (Windows)

2006-07-09 Thread jim holtman
?basename

On 7/9/06, Charles Annis, P.E. [EMAIL PROTECTED]
wrote:

 Greetings, R-ians:

 I'm using R 2.3.1 on WindowsXP.

 I need to find the name of a file at the end of a sting that contains the
 path + file, with the problematic \\ as separators.

 The string looks something like this:

 C:\\Documents and Settings\\myName\\My Documents\\R
 Projects\\Project1\\file.name.csv

 What I want is file.name.csv

 Currently I use the name of the project as the splitter in

 strsplit(string.name, split=Project1, extended = FALSE)

 This works, of course, but I won't always be using folder Project1, so I
 need a more universal way to find the name of a file at the end of a
 string
 with \\ separators.

 Can I get there from here?  (I've looked through previous R-help listing
 of
 similar problems but if it's there, I missed it.)

 Thanks.


 Charles Annis, P.E.

 [EMAIL PROTECTED]
 phone: 561-352-9699
 eFax: 614-455-3265
 http://www.StatisticalEngineering.com


 __
 R-help@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




-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390 (Cell)
+1 513 247 0281 (Home)

What is the problem you are trying to solve?

[[alternative HTML version deleted]]

__
R-help@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


Re: [R] string problems with \\ (Windows)

2006-07-09 Thread Duncan Murdoch
basename() works.  If you're on a system that doesn't think \\ is a path 
separator, you could do something like

x - C:\\Documents and Settings\\myName\\My 
Documents\\RProjects\\Project1\\file.name.csv
basename(gsub('','/',x))

Duncan Murdoch

Charles Annis, P.E. wrote:
 Greetings, R-ians:

 I'm using R 2.3.1 on WindowsXP.

 I need to find the name of a file at the end of a sting that contains the
 path + file, with the problematic \\ as separators. 

 The string looks something like this:

 C:\\Documents and Settings\\myName\\My Documents\\R
 Projects\\Project1\\file.name.csv

 What I want is file.name.csv

 Currently I use the name of the project as the splitter in

 strsplit(string.name, split=Project1, extended = FALSE)

 This works, of course, but I won't always be using folder Project1, so I
 need a more universal way to find the name of a file at the end of a string
 with \\ separators.

 Can I get there from here?  (I've looked through previous R-help listing of
 similar problems but if it's there, I missed it.)

 Thanks.


 Charles Annis, P.E.

 [EMAIL PROTECTED]
 phone: 561-352-9699
 eFax:  614-455-3265
 http://www.StatisticalEngineering.com
  

 __
 R-help@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


__
R-help@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


[R] distance in kmeans algorithm?

2006-07-09 Thread Arnau Mir
Hello.

Is it possible to choose the distance in the kmeans algorithm?

I have m vectors of n components and I want to cluster them using kmeans
algorithm but I want to use the Mahalanobis distance or another distance.

How can I do it in R?
If I use kmeans, I have no option to choose the distance.

Thanks in advance,

Arnau.

__
R-help@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


Re: [R] package:Matrix handling of data with identical indices

2006-07-09 Thread roger koenker


On 7/8/06, Thaden, John J [EMAIL PROTECTED] wrote:

 As there is nothing inherent in either compressed, sparse,
 format that would prevent recognition and handling of
 duplicated index pairs, I'm curious why the dgCMatrix
 class doesn't also add x values in those instances?

why not multiply them?  or take the larger one, or ...?  I would
interpret this as a case of user negligence -- there is no
natural default behavior for such cases.

On Jul 9, 2006, at 11:06 AM, Douglas Bates wrote:

 Your matrix Mc should be flagged as invalid.  Martin and I should
 discuss whether we want to add such a test to the validity method.  It
 is not difficult to add the test but there will be a penalty in that
 it will slow down all operations on such matrices and I'm not sure if
 we want to pay that price to catch a rather infrequently occuring
 problem.

Elaborating the validity procedure to flag such instances seems
to be well worth the  speed penalty in my view.  Of course,
anticipating every such misstep imposes a heavy burden
on developers and constitutes the real cost of more elaborate
validity checking.

[My 2cents based on experience with SparseM.]

url:www.econ.uiuc.edu/~rogerRoger Koenker
email   [EMAIL PROTECTED]   Department of Economics
vox:217-333-4558University of Illinois
fax:217-244-6678Champaign, IL 61820

__
R-help@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


Re: [R] distance in kmeans algorithm?

2006-07-09 Thread Prof Brian Ripley
You do realize that Mahalanobis distance is just Euclidean distance on 
some linear transformation of the variables?  So all you need to do is to 
transform the data you pass to kmeans to 'sphere' the Mahalanobis 
distance.

The K means *algorithms* do depend on Euclidean distance (e.g. in choosing 
the cluster centres as the centroids), so your initial question makes 
little sense.  You can of course use the criterion with other distances, 
but you need to develop other algorithms to do so.

On Sun, 9 Jul 2006, Arnau Mir wrote:

 Hello.

 Is it possible to choose the distance in the kmeans algorithm?

 I have m vectors of n components and I want to cluster them using kmeans
 algorithm but I want to use the Mahalanobis distance or another distance.

 How can I do it in R?
 If I use kmeans, I have no option to choose the distance.

 Thanks in advance,

 Arnau.

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-help@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


[R] Choice of repository and outdated vs unusable... was (Hunting for snow...)

2006-07-09 Thread Brian Lunergan
Uwe Ligges wrote:
 Where did you find them? At least not in their current versions on 
 the official repository on CRAN master for R-2.3.x, I hope.

 FracSim_0.2.zip
 http://cran.stat.ucla.edu/bin/windows/contrib/2.3/

 RDCOMClient_0.91-0.zip
 http://www.omegahat.org/R/bin/windows/contrib/R-2.3.0/

 segmented_0.1-4.zip
 http://cran.r-project.org/bin/windows/contrib/2.1/

 VGAM_0.6-9.zip
 http://www.stat.auckland.ac.nz/~yee/bin/windows/contrib/2.3/
 
 None of them is on CRAN master:
 
 - RDCOMClient is on Omegahat
 - segmented is CRAN but outdated for R-2.1.x
 - VGAM is in a private repository
 - FracSim: I cannot access
 http://cran.stat.ucla.edu/bin/windows/contrib/2.3/
 right now, but I guess it does not sync properly. At least, the package 
 should not be there.
 
 Uwe Ligges

Uwe:

So VGAM and RDCOMClient are on private repository sites. Is that so 
important? If a package is not on the CRAN master site are you supposed to 
avoid using it?

The FracSim home site indicated that 0.2 was the current version and a 
google search yielded the site I indicated, among others, as a repository 
of an apparent windows edition. That it's not on the master is more an 
issue between the maintainers of the master and the maintainers of the 
package, not the average end user IMHO. I found a source for what is 
apparently the current edition. What's wrong with that?

With regard to segmented, outdated does not mean unusable unless later 
editions of R or packages that call it as a dependency use features 
particular to later editions. If there is a newer windows edition of 
segmented then please point out a source for it.

Regards...
-- 
Brian Lunergan
Nepean, Ontario
Canada


---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 0627-3, 2006-07-07
Tested on: 2006-07-09 14:35:21
avast! is copyright (c) 2000-2006 ALWIL Software.
http://www.avast.com

__
R-help@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


Re: [R] package:Matrix handling of data with identical indices

2006-07-09 Thread Thaden, John J
On Sunday, July 09, 2006 12:31 PM, Roger Koenker = RK
[EMAIL PROTECTED] wrote 

RK On 7/8/06, Thaden, John J [EMAIL PROTECTED] wrote:

JT As there is nothing inherent in either compressed, sparse,
JT format that would prevent recognition and handling of
JT duplicated index pairs, I'm curious why the dgCMatrix
JT class doesn't also add x values in those instances?

RK why not multiply them?  or take the larger one, 
RK or ...?  I would interpret this as a case of user
RK negligence -- there is no natural default behavior
RK for such cases.

This user created example data to illustrate his question, but
of course he faces real data, analytical chemical in this case,
data that happen to come with an 8.4% occurrence of non-unique
index pairs, and also, quite literally, with a natural way 
to treat cases (the ~nature~ of the assay makes it correct to
sum them).  I can think of other natural data sets where 
averaging would be the natural behavior. So you are right 
that there is no default natural behavior, thus, my 
suggestion to leave that to user choice via function argument
or class slot, defaulted to summing.

Actually in this case there ~is~ one behavior superior to 
summing -- abstracting one of the data pair (that share indices)
into a second (very sparse) overlay matrix.  Perhaps it is
my negligence not to have done this instead querying the list :-)
I am doing it now.

Regards,
-John Thaden 

RK On Jul 9, 2006, at 11:06 AM, Douglas Bates wrote:

  DB Your matrix Mc should be flagged as invalid.  Martin and I should
  DB discuss whether we want to add such a test to the validity method.
It
  DB is not difficult to add the test but there will be a penalty in
that
  DB it will slow down all operations on such matrices and I'm not sure
if
  DB we want to pay that price to catch a rather infrequently occuring
  DB problem.

RK Elaborating the validity procedure to flag such instances seems
RK to be well worth the  speed penalty in my view.  Of course,
RK anticipating every such misstep imposes a heavy burden
RK on developers and constitutes the real cost of more elaborate
RK validity checking.
RK
RK [My 2cents based on experience with SparseM.]

Confidentiality Notice: This e-mail message, including any a...{{dropped}}

__
R-help@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


[R] Error Calculating Mean

2006-07-09 Thread justin rapp
I have a vector containing players' weights.  When I enter


mode(data.linear$Weight)
numeric is returned.


When I type mean(data.linear$Weight)

NA is returned.

Any ideas as to why this may be the case?  I am trying to calculate
this ultimately so I can superimpose a normal density line over a
histogram containing the weights?

__
R-help@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


Re: [R] Error Calculating Mean

2006-07-09 Thread Mike Nielsen
I'd hazard a guess that data.linear$Weight may have a Not Available
data point (ie. missing data).

 f - c(NA,rnorm(10))
 mode(f)
[1] numeric
 mean(f)
[1] NA

If you'd like to compute the mean anyway, you can use
 mean(f,na.rm=TRUE)
[1] 0.3433036


On 7/9/06, justin rapp [EMAIL PROTECTED] wrote:
 I have a vector containing players' weights.  When I enter


 mode(data.linear$Weight)
 numeric is returned.


 When I type mean(data.linear$Weight)

 NA is returned.

 Any ideas as to why this may be the case?  I am trying to calculate
 this ultimately so I can superimpose a normal density line over a
 histogram containing the weights?

 __
 R-help@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



-- 
Regards,

Mike Nielsen

__
R-help@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


Re: [R] package:Matrix handling of data with identical indices

2006-07-09 Thread Thaden, John J
Thanks. I see in the UMFPACK manual that the convention for csc matrices
for monotonic-increasing row indices is as you say.  

I notice UMFPACK flags errors liberally. What if Matrix or some other
package were made to interface with UMFPACK directly, to tap these and
other features?

-John Thaden

[EMAIL PROTECTED] wrote:

...
...
DB It is not permissible to have repeated indices in the compressed
form.  In the compressed form there is a well-defined ordering of the
indices, first by columns then by row within column and the row
indices must be increasing within columns.

DB Your matrix Mc should be flagged as invalid.  Martin and I should
discuss whether we want to add such a test to the validity method.  It
is not difficult to add the test but there will be a penalty in that
it will slow down all operations on such matrices and I'm not sure if
we want to pay that price to catch a rather infrequently occuring
problem.

DB There is some documentation of the internal representations of these
formats in the directory $R_LIB/Matrix/doc/UFSparse/.  The User Guides
in that directory are taken directly from the various sparse matrix
packages that Tim Davis at the University of Florida has written.  He
has a book that is scheduled for publication this  September

DB Tim Davis (2006), Direct Methods for Sparse Linear Systems, SIAM,
Philadelphia, PA

DB I hope we will be able to refer to that book for details of the
representation and algorithms.

On 7/8/06, Thaden, John J [EMAIL PROTECTED] wrote:
 In the Matrix package v. 0.995-11 I see that the dgTMatrix
 Class for compressed, sparse, triplet-form matrices handles
 Identically indexed data instances by summing their values,
 e.g.,

 library(Matrix)
 (Mt - new(dgTMatrix,
i = as.integer(c(0,0,1,1,4)),
j = as.integer(c(0,1,2,2,4)),
x = as.double(1:5),
Dim = as.integer(c(5,5
 ## 5 x 5 sparse Matrix of class dgTMatrix
 ## [1,] 1 2 . . .
 ## [2,] . . 7 . .--- 7 = 3 + 4.
 ## [3,] . . . . .
 ## [4,] . . . . .
 ## [5,] . . . . 5

 # If instead I make a dgCMatrix-class matrix, the first
 # instance is overwritten by the second, e.g.,

 library(Matrix)
 (Mc - new(dgCMatrix,
i = as.integer(c(0,0,1,1,4)),
p = as.integer(c(0,1,2,4,5)),
x = as.double(1:5),
Dim = as.integer(c(5,5
 ## 5 x 5 sparse Matrix of class dgCMatrix
 ##
 ## [1,] 1 2 . .
 ## [2,] . . 4 .   -- the datum '3' has been lost.
 ## [3,] . . . .
 ## [4,] . . . .
 ## [5,] . . . 5

 # If one arrives at the dgCMatrix via the dgTMatrix class,
 # the summed value is of course preserved, e.g.,

 (Mtc - as(Mt, dgCMatrix))
 ## 5 x 5 sparse Matrix of class dgCMatrix
 ##
 ## [1,] 1 2 . . .
 ## [2,] . . 7 . .
 ## [3,] . . . . .
 ## [4,] . . . . .
 ## [5,] . . . . 5

 As there is nothing inherent in either compressed, sparse,
 format that would prevent recognition and handling of
 duplicated index pairs, I'm curious why the dgCMatrix
 class doesn't also add x values in those instances?
 I wonder also if others might benefit also by being able
 to choose how these instances are handled, i.e.,
 whether they are summed, averaged or overwritten?

 -John Thaden, Ph.D.
 Research Assistant Professor of Geriatrics
 University of Arkansas for Medical Sciences
 Little Rock AR, USA


 Confidentiality Notice: This e-mail message, including any
attachments, is for the sole use of the intended recipient(s) and may
contain confidential and privileged information.  Any unauthorized
review, use, disclosure or distribution is prohibited.  If you are not
the intended recipient, please contact the sender by reply e-mail and
destroy all copies of the original message.



Confidentiality Notice: This e-mail message, including any a...{{dropped}}

__
R-help@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


[R] R vs. other software? (was: Software for Epidmiological, Longitudinal Data)

2006-07-09 Thread Spencer Graves
  There have been numerous discussions on this listserve of the 
comparative advantages of R vs. SAS, for example, and various benchmark 
studies have been published.  If you haven't already tried Google, I 
encourage you to do so.


PRIMARY STRENGTHS OF R

  From my perspective, R is the platform of choice for new statistical 
algorithm development for a rapidly increasing number of people.  The 
open source nature of R provides huge advantages for learning and for 
new algorithm development.  If I don't understand something, I can walk 
through the code line by line until I figure it out.  That's especially 
easy with the 'debug' facility in R.

  Similarly, the ease with which I can experiment with a modification 
of an existing algorithm depends on the availability of source code for 
something similar.  With commercial software, that obstacle is often 
insurmountable.  With open source, this kind of experimentation is 
trivial for anyone who is not intimidated by command-driven software.


MARKET SHARE

  The popularity of R can be judged in part from the fact that it is 
available from 58 mirrors in in 24 countries;  those were the numbers I 
got when I counted a couple of months ago.  At that time, the mirror I 
checked offered free instant access to 724 contributed packages beyond 
the base distribution, and this does not include much of the 
'Bioconductor', which specializes in microarray data.  There are 
occasional difference between mirrors, but those are temporary.

  At one time, the market dominance of both SAS and IBM was sustained 
by the perception that 'nobody ever got fired' for using them.  Those 
days are history now for SAS as well as IBM, even with the Food and Drug 
Administration (FDA), where for many years, SAS was the de facto 
standard in many pharmaceutical companies for their applications for 
regulatory approval.

  I have no data on the use of R in articles submitted to refereed 
journals, but I'm confident it is growing.

  Increasingly, when I consider reading an article or buying a book, I 
look for the availability of a companion R package, because it can make 
a huge difference in how easily and thoroughly I can absorb the material.


SOFTWARE QUALITY

  The core R distribution seems to be as solid as anything on the 
market today.  Contributed packages run from rock solid to highly buggy.


GRAPHICAL USER INTERFACE

  R does not ship with a GUI, but several are available;  see 
www.sciviews.org/_rgui.  I use XEmacs (ESS), mentioned on that web 
site, but it's primary a command line editor.  More GUI-type features 
are available from other open source software such as SciViews and JGR.


TECHNICAL SUPPORT

  The level of support available from this listserve beats the level of 
technical support I've ever gotten for any commercial software.  Some 
people's questions never get answered, but that's true with technical 
support anywhere.  Other questions generate a feeding frenzy of replies. 
  This listserve has a posting guide 
(www.R-project.org/posting-guide.html);  I believe that posts that more 
closely match those guidelines are more likely to be greeted with 
multiple replies than silence.  R-help is on-line, 24-7.  If you really 
want an answer and don't get one in 24 hours, review the posting guide, 
and think about how you can make your question more clear, perhaps with 
a different subject line and / or a simple (or simpler) self-contained 
example.

  The R Site Search is also great, and now there's an R Wiki.

  For two other previous comments related to this, see the following:

http://finzi.psych.upenn.edu/R/Rhelp02a/archive/51244.html

https://stat.ethz.ch/pipermail/r-sig-finance/2004q4/000250.html

  Hope this helps.
  Spencer Graves

Andrea Meyer wrote:
 Hello
 
 We are a team working on a prospective psychological study. The study 
 design is based on assessing data of three generations of humans over a 
 long time period, wherein epidemiological as well as biological data 
 will be assessed. Sample sizes will range from about 100 to several 
 thousand depending on the research question.
  
 Currently we are looking for an apropriate statistical package. Here are 
 some features that the software should have:
 - strong in the analysis of epidemiological and longitudinal data
 - platform independent (should run under different operating systems 
 like Windows, Mac OS, Unix)
 - Ease of use for non-statistic-professionals (i.e. userfriendly GUI)
 - High acceptance by scientific journals, by the FDA
 - Importance relative to other packages with respect to the number of 
 users, the number of publications in which the software is used, the 
 market share etc.  (including the recent development of these indices!) 
  
 As we had some problems in finding information concerning these items we 
 would like to ask you where we 

[R] How to get R to ignore certain values when analyzing a column in a data table ?

2006-07-09 Thread Daryl Manning
Apologies if this is in (one of the many) manuals somewhere... Trying  
to switch to R from other stats programs.

Basically, I have a large data table I've dumped from a DB, some of  
the values which are nulls '-' which I've converted to zeros. I've  
read it in using read.table fine.

I want R to ignore the zero values when graphing or doing various  
other calculations.

Is there a way to do this ?

I did try to use NA but kept getting errors that x must be numeric.

thanks in advance,
Daryl.

__
R-help@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


[R] problem in my code

2006-07-09 Thread Taka Matzmoto
Dear R-users

I wrote a small program for assigning a membership

Here is my script

sample.size - 60

x - rnorm(sample.size, 0, 1)
y - rnorm(sample.size, 0, 1)

x.mean - mean(x)
y.mean - mean(y)
membership - numeric(sample.size)

for (i in 1:sample.size)
{
if ((x[i]  x.mean)  (y[i]  y.mean))
{
membership[i] - 1
} else {
if ((x[i]  x.mean)  (y[i]  y.mean))
{
membership[i] - 2
} else {
if ((x[i]  x.mean)  (y[i]  
y.mean))
{
membership[i] - 3
} else
{
membership[i] - 4
}
   }

}

}
cbind(x,y,membership)

There is an error message
Error: object membership not found
I can't figure it out.

Any help or advice on improvement for this code will be appreciated.
I konw this code is not well written at all.

Thank you

Taka

__
R-help@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


Re: [R] problem in my code

2006-07-09 Thread W. Yamamoto

Hi,

How about replacing all - with -?  That error occured in
 membership[i] - 1
this line and this code stopped before
 cbind(x,y,membership)
this line.

Hope this may help you.
---
W. Yamamoto

 Dear R-users

 I wrote a small program for assigning a membership

 Here is my script

 sample.size - 60

 x - rnorm(sample.size, 0, 1)
 y - rnorm(sample.size, 0, 1)

 x.mean - mean(x)
 y.mean - mean(y)
 membership - numeric(sample.size)

 for (i in 1:sample.size)
 {
 if ((x[i]  x.mean)  (y[i]  y.mean))
 {
 membership[i] - 1
 } else {
 if ((x[i]  x.mean)  (y[i]  y.mean))
 {
 membership[i] - 2
 } else {
 if ((x[i]  x.mean)  (y[i] 
 y.mean))
 {
 membership[i] - 3
 } else
 {
 membership[i] - 4
 }
}

 }

 }
 cbind(x,y,membership)

 There is an error message
 Error: object membership not found
 I can't figure it out.

 Any help or advice on improvement for this code will be appreciated.
 I konw this code is not well written at all.

 Thank you

 Taka

 __
 R-help@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



__
R-help@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


[R] about overdispersed poisson model

2006-07-09 Thread g0354502
Dear R users

  I have been looking for functions that can deal with overdispersed poisson
models. According to actuarial literature (England  Verall, Stochastic Claims 
Reserving in General Insurance , Institute of Actiuaries 2002) this can be 
handled through the
use of quasi likelihoods instead of normal likelihoods. However, we see them 
frequently
in this type of data, and we would like to be able to fit the model anyway.
If it is possible, would you please show me how to find the corresponding 
package and utilize them?

Best Regards,

Chi Kai

__
R-help@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

Re: [R] about overdispersed poisson model

2006-07-09 Thread ronggui

You can use glm to analysis this data ,with family=quasipoisson.
see ?glm and ?family



2006/7/10, g0354502 [EMAIL PROTECTED]:

Dear R users

  I have been looking for functions that can deal with overdispersed poisson
models. According to actuarial literature (England  Verall, Stochastic Claims
Reserving in General Insurance , Institute of Actiuaries 2002) this can be 
handled through the
use of quasi likelihoods instead of normal likelihoods. However, we see them 
frequently
in this type of data, and we would like to be able to fit the model anyway.
If it is possible, would you please show me how to find the corresponding 
package and utilize them?

Best Regards,

Chi Kai



__
R-help@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





--
黄荣贵
Department of Sociology
Fudan University

__
R-help@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

Re: [R] problem in my code

2006-07-09 Thread Gabor Grothendieck
The problem can be reduced to this:

x - 1
x[1] - 2 # error

The following are ok:

x - 1
x[1] - 3

x - 1
x - 4

x - 1
x - 5

Does anyone know why?  Is this a bug in - ?


On 7/9/06, Taka Matzmoto [EMAIL PROTECTED] wrote:
 Dear R-users

 I wrote a small program for assigning a membership

 Here is my script

 sample.size - 60

 x - rnorm(sample.size, 0, 1)
 y - rnorm(sample.size, 0, 1)

 x.mean - mean(x)
 y.mean - mean(y)
 membership - numeric(sample.size)

 for (i in 1:sample.size)
{
if ((x[i]  x.mean)  (y[i]  y.mean))
{
membership[i] - 1
} else {
if ((x[i]  x.mean)  (y[i]  y.mean))
{
membership[i] - 2
} else {
if ((x[i]  x.mean)  (y[i] 
 y.mean))
{
membership[i] - 3
} else
{
membership[i] - 4
}
   }

}

}
 cbind(x,y,membership)

 There is an error message
 Error: object membership not found
 I can't figure it out.

 Any help or advice on improvement for this code will be appreciated.
 I konw this code is not well written at all.

 Thank you

 Taka

 __
 R-help@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


__
R-help@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


[R] A possible too old question on significant test of correlation matrix

2006-07-09 Thread Guo Wei-Wei
Dear all,

I'm working on a data.frame named en.data, which has n cases and m columns.
I generate the correlation matrix of en.data by

 cor(en.data)

I find that there is no p-value on each correlation in the correlation
matrix. I searched in the R-help mail list and found some related
posts, but I didn't find direct way to solve the problem. Someone said
to use cor.test() or t.test(). The problem is that cor.test() and
t.test() can only apply on two vectors, not on a data.frame or a
matrix.

My solution is

for (i in 1:(ncol(en.data) -1)) {
   cor.test(en.data[,i], en.data[, i+1])
}

I think it is a stupid way. Is there a direct way to do so? After all,
it is a basic function to generate significant level of a correlation
in a correlation matrix.

Thank you in advance!
Wei-Wei

__
R-help@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