[R] rev matrix

2004-10-15 Thread lindsayv
Hello

I am looking for a function which performs the same thing as rev but on a
matrix rather then a vector, based on one column.
I'd be happy to read the man page if such a function exists.

Thanks,
Vera Lindsay

__
[EMAIL PROTECTED] 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] Gumbel distribution

2004-10-15 Thread Anne Piotet
Does R have  built in Gumbel distribution (pdf, ecdf, hazard, parameters estimation) 
for the minimum case?
Thanks 

Anne
[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] 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] rev matrix

2004-10-15 Thread Prof Brian Ripley
On Thu, 14 Oct 2004 [EMAIL PROTECTED] wrote:

 Hello
 
 I am looking for a function which performs the same thing as rev but on a
 matrix rather then a vector, based on one column.
 I'd be happy to read the man page if such a function exists.

If I understand you, it is easy to do by indexing, but `based on one 
column' puzzles me and I take it you want each column reversed.

A - matrix(1:20, 4, 5)
A[4:1, ]

or more generally

A[rev(seq(len=nrow(A))), ]

If that is not what you mean, please give us an example to look at.

-- 
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

__
[EMAIL PROTECTED] 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] Gumbel distribution

2004-10-15 Thread Matthias . Kohl
please, take a look at package evd

Matthias

 Does R have  built in Gumbel distribution (pdf, ecdf, hazard, parameters
 estimation) for the minimum case? Thanks

 Anne
   [[alternative HTML version deleted]]

 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide!
 http://www.R-project.org/posting-guide.html

__
[EMAIL PROTECTED] 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] maximum likelihood estimation

2004-10-15 Thread Martin Maechler
 Roger == Roger D Peng [EMAIL PROTECTED]
 on Thu, 14 Oct 2004 17:06:25 -0400 writes:

Roger What lead you to believe that mle() is defunct?  It's
Roger still in the `stats4' package in my installation of
Roger R.

yes indeed.  Just to clarify possible confusions:

The 'mle' *package* has been merged into the new 'stats4'
package {for 1.9.0 already}.  The mle() function has always been
available and there were even discussions on extension /
generalization of its functioning and the methods working on
mle-class objects (produced by mle(...).

Martin

Roger -roger

Roger T. Murlidharan Nair wrote:

 Since mle is defunct is there anyother function I can use
 for maximum likelihood estimation ?  Thanks ../Murli

__
[EMAIL PROTECTED] 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 number characters

2004-10-15 Thread Martin Maechler
 Spencer == Spencer Graves [EMAIL PROTECTED]
 on Thu, 14 Oct 2004 13:41:24 -0700 writes:

Spencer   It looks like you have several non-printing
Spencer characters.  nchar will give you the total number
Spencer of characters in each character string.

Spencer strsplit can break character strings into single
Spencer characters, and %in% can be used to classify
Spencer them.

and you give nice coding examples:

Spencer Consider the following:
 x - Draszt 0%/1€Œiso8859-15³
 nx - nchar(x)
 x. - strsplit(x, )
 length(x.[[1]])
Spencer [1] 29
 
 namechars - c(letters, LETTERS, as.character(0:9), .)

just to be precise:  If 'namechars' is supposed to mean
``characters valid in R object names'', then you should have
added _ as well:

namechars - c(letters, LETTERS, as.character(0:9), ., _)

 punctuation - c(,, !, +, *, , |)
 legalchars - c(namechars, punctuation)

and 'legalchars' would have to contain quite a bit more I
presume, e.g. $, @, 
(but that wouldn't have been a reason to write this e-mail..)

 legalx - lapply(x., function(y)(y %in% legalchars))
 x.[[1]][!legalx[[1]]]
Spencer [1]    % /  €  Œ -   ³
 
 sapply(legalx, sum)
Spencer [1] 17

Spencer Will this give you ideas about what to do what you want?
Spencer hope this helps. spencer graves

(and this too)

Martin Maechler, ETH Zurich


Spencer Gabor Grothendieck wrote:

 Assuming that the problem is that your input file has 
 additional embedded characters added by the data base
 program you could try extracting just the text using
 the UNIX strings program:
 
 strings myfile.csv  myfile.txt
 
 and see if myfile.txt works with R and if not check out
 what the differences are between it and the .csv file.
 
 Date:   Thu, 14 Oct 2004 11:31:33 -0700 
 From:   Scott Waichler [EMAIL PROTECTED]
 To:   [EMAIL PROTECTED] 
 Subject:   [R] Problem with number characters 
 
 
 I am trying to process text fields scanned in from a csv file that is
 output from the Windows database program FileMakerPro. The characters
 onscreen look like regular text, but R does not like their underlying binary 
form.
 For example, one of text fields contains a name and a number, but
 R recognizes the number as something other than what it appears
 to be in plain text. The character string Draszt 03 after being
 read into R using scan and = becomes Draszt 03 where the 3 is 
 displayed in my R session as a superscript. Here is the result pasted
 into this email I'm composing in emacs: Draszt 0%/1€Œiso8859-15³
 Another clue for the knowledgable: when I try to display the vector element
 causing trouble, I get
 CHARSXP: Draszt 0%/1€Œiso8859-15³
 where again the superscipt part is just 3 in my R session. I'm working in
 Linux, R version 1.9.1, 2004-06-21. Your help will be much appreciated.
 
 Scott Waichler
 Pacific Northwest National Laboratory
 [EMAIL PROTECTED]

__
[EMAIL PROTECTED] 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] C/C++

2004-10-15 Thread Witold Eryk Wolski
Hi,
Unfortunately I have only some beginners hints to this very interesting 
topic.

Writing R extensions provides examples how to execute r functions from 
within C code.
There is also somewhere a doc how to use R as a shared library (?). But 
I dont remember in which doc exactly.

Furthermore Rserv:
rserv (http://www.rosuda.org/Rserve/index.shtml) has a C++ API for 
calling r functions.

Eryk.

doktora v wrote:
Hey everyone,
I have been looking for a while for ways to integrate R's wonderful
functions into my C++ software, but I have not found anything
concrete.
So finally, i post to this list to see if anyouse else knows about
this, or has done it!? Is it possible? Are there C++ or C R libraries?
Or is it sufficiently easy to build them?
your help is much appreciated!
thanks
doktora
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
 


--
Dipl. bio-chem. Witold Eryk Wolski
MPI-Moleculare Genetic
Ihnestrasse 63-73 14195 Berlin
tel: 0049-30-83875219 __(_
http://www.molgen.mpg.de/~wolski  \__/'v'
http://r4proteomics.sourceforge.net||/   \
mail: [EMAIL PROTECTED]^^ m m
 [EMAIL PROTECTED]
__
[EMAIL PROTECTED] 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 and Java

2004-10-15 Thread laura.dow
Hi Bobby,

 

You are right - functions is a StringBuffer object.

 

I've compiled without the syntax error.

 

The error message is: Error in dev.print(

  can only read screen device

 

Do you think this means that RTerm doesn't actually produce a

Screen plot when called from Java?

 

i.e., functions.append(plot(something)\n);

 

doesn't produce a screen plot anywhere?

 

Regards,

 

Laura

 

 

-

 

Laura Jane Dow

 

Energy Scitech Ltd,

Scitech House,

1 Barnby Road,

Knaphill,

Woking,

Surrey.

GU21 2NL

 

[EMAIL PROTECTED]

Phone:  +44 (0)1483 79 50 58 Direct

Phone: +44 (0)1483 79 78 00 Central 
Fax: +44 (0)1483 79 76 00
Mobile: +44 (0)7763 10 54 07

 http://www.enscitech.com/ http://www.enscitech.com

 


[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] 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] cluster analysis

2004-10-15 Thread Christian Hennig
Dear James,

sorry, this is not really an answer.
I use cutree to obtain clusters from an hclust object.
I do not get from the identify help page that identify should do anything
like what you expect it to do... I tried it out and to my surprise it
behaved as you said, i.e., it indeed does something at least similar to what
you want it to do, and that might be useful also for me. However, I wonder
where you got the information that identify could be suitable to obtain the
hclust clusters.

Puzzled,
Christian

PS: It seems that each value is typed twice because classi is named, and
each value is also a name. Try as.vector(classi). (Perhaps a little useful
help in the end?)

On Fri, 15 Oct 2004, James Foadi wrote:

 Hello. I wonder if anyone can help me with this.
 
 I'm performing cluster analysis by using hclust in stats package.
 My data are contained in a data frame with 10 columns, named drops.
 
 Firs I create a distance matrix using dist:
   
   distanxe - dist(drops)
 
 Then I perform cluster analysis via hclust:
 
   clusters - hclust(distanze)
 
 At this point I want to view the tree plot, and use plot:
 
   plot(clusters)
 
 Then, once decided which clusters to select, I start identify:
 
   classi - identify(clusters)
 
 and click on all clusters to be selected; I then finish by right-clicking.
 
 My understanding is that classi is now a list containing all individual 
 data, grouped in clusters. In my case classi contained 10 objects,
 simply named [1], [2], etc.
 
 To obtain all individual data belonging to one object I thought that
 would have sufficed to type for instance:
 
   classe_01 - classi[[1]]
 
 Unfortunately, rather than obtaining a vector, I obtain a numeric where
 each value is typed twice.
 
 Can anyone explain why, or what I've done wrong?
 
 Many thanks,
 
 james
 -- 
 Dr James Foadi
 Structural Biology Laboratory
 Department of Chemistry
 University of York
 YORK YO10 5YW
 UK
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
 

***
Christian Hennig
Fachbereich Mathematik-SPST/ZMS, Universitaet Hamburg
[EMAIL PROTECTED], http://www.math.uni-hamburg.de/home/hennig/
###
ich empfehle www.boag-online.de

__
[EMAIL PROTECTED] 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] cluster analysis

2004-10-15 Thread Martin Maechler
 ChrisH == Christian Hennig [EMAIL PROTECTED]
 on Fri, 15 Oct 2004 11:43:53 +0200 (MEST) writes:

ChrisH Dear James,
ChrisH sorry, this is not really an answer.

nor this.  I'm answering Christian...

ChrisH I use cutree to obtain clusters from an hclust
ChrisH object.  I do not get from the identify help page
ChrisH that identify should do anything like what you
ChrisH expect it to do... I tried it out and to my surprise
well,
the reason is simple:  
There's been a nice  identify.hclust() method for a long  time 
and this is mentioned (including a link to the page) on the 
?hclust page.

ChrisH it behaved as you said, i.e., it indeed does
ChrisH something at least similar to what you want it to
ChrisH do, and that might be useful also for me. However, I
ChrisH wonder where you got the information that identify
ChrisH could be suitable to obtain the hclust clusters.

(see above) --- 
 you see: It *does* pay to read documentation carefully

ChrisH Puzzled,
ChrisH Christian

ChrisH PS: It seems that each value is typed twice because
ChrisH classi is named, and each value is also a name. Try
ChrisH as.vector(classi). (Perhaps a little useful help in
ChrisH the end?)

or unname(classi) -- which is slightly more expressive in this
case and possibly more desirable in other situations.

Martin Maechler, ETH Zurich


ChrisH On Fri, 15 Oct 2004, James Foadi wrote:

 Hello. I wonder if anyone can help me with this.
 
 I'm performing cluster analysis by using hclust in stats package.
 My data are contained in a data frame with 10 columns, named drops.
 
 Firs I create a distance matrix using dist:
 
 distanxe - dist(drops)
 
 Then I perform cluster analysis via hclust:
 
 clusters - hclust(distanze)
 
 At this point I want to view the tree plot, and use plot:
 
 plot(clusters)
 
 Then, once decided which clusters to select, I start identify:
 
 classi - identify(clusters)
 
 and click on all clusters to be selected; I then finish by right-clicking.
 
 My understanding is that classi is now a list containing all individual 
 data, grouped in clusters. In my case classi contained 10 objects,
 simply named [1], [2], etc.
 
 To obtain all individual data belonging to one object I thought that
 would have sufficed to type for instance:
 
 classe_01 - classi[[1]]
 
 Unfortunately, rather than obtaining a vector, I obtain a numeric where
 each value is typed twice.
 
 Can anyone explain why, or what I've done wrong?
 
 Many thanks,
 
 james
 -- 
 Dr James Foadi
 Structural Biology Laboratory
 Department of Chemistry
 University of York
 YORK YO10 5YW
 UK

__
[EMAIL PROTECTED] 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] cluster analysis

2004-10-15 Thread James Foadi
On Friday 15 Oct 2004 10:43 am, you wrote:

 PS: It seems that each value is typed twice because classi is named, and
 each value is also a name. Try as.vector(classi). (Perhaps a little useful
 help in the end?)

Indeed. I have tried, for example:

as.vector(classi[[1]])

and obtained only one set of values. For some strange reason
each object of list classi is a named vector where the name of each
component is the component itself.

By the way, the cutree function you suggested is even more useful
for what I want to do.

The info on identify() can easily be obtained using help(hclust); you'll
find it at the end of the help page.


Many thanks, Christian !

J

-- 
Dr James Foadi
Structural Biology Laboratory
Department of Chemistry
University of York
YORK YO10 5YW
UK

__
[EMAIL PROTECTED] 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] Announcing books on R - policy {was Statistical analys...}

2004-10-15 Thread Martin Maechler
 Vadim == Vadim Ogranovich [EMAIL PROTECTED]
 on Thu, 14 Oct 2004 10:50:08 -0700 writes:

Vadim I thought that maybe authors of books on R should be
Vadim allowed (encouraged ?) to announce
Vadim availability/revisions of their books via the
Vadim R-packages list?

Well, most good *) books on R nowadays have a (usually small) R
package going along, for datasets and some own functions.

*) One notable current exception: Uwe Ligges book
   __in German__   http://www.statistik.uni-dortmund.de/~ligges/PmitR/
   But maybe he'll change that too.

Vadim For example I'd be very interested to have another
Vadim look at Dr. Torgo's book when it becomes more
Vadim complete and I'd appreciate a revision notice via the list.

Hmm, I'm really reluctant to change the 'R-packages' policy,
particularly because it won't be necessary in general (see above).
Further note that we have the 'R Newsletter' with book reviews,
too.  
Further comments are welcome.

Martin Maechler


Vadim Thanks, Vadim


 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Luis Torgo
 Sent: Wednesday, October 13, 2004 12:03 PM
 To: Prof Brian Ripley
 Cc: Vito Ricci; [EMAIL PROTECTED]
 Subject: Re: [R] Statistical analysis of a large database
 
 On Tue, 2004-10-12 at 08:36, Prof Brian Ripley wrote:
   Luís Torgo, Data Mining with R. Learning by case studies, Maggio 
   2003 http://www.liacc.up.pt/~ltorgo/DataMiningWithR/
  
  Please note that that reference is not about large 
 datasets, nor about 
  `data mining' in the generally used sense.  It has two studies, one 
  incomplete, on linear regression (with 200 samples) and on 
 time series.
 
 I would like to add a few information on these incomplete 
 comments on the book I'm writing. The book is unfinished as 
 mentioned on its Web page. It has currently two reasonably 
 finished chapters: an introduction to R and MySQL and a case 
 study. As mentioned in the book, the first case study is 
 small by data mining standards (200 observations) and has the 
 goal of illustrating techniques that are shared by data 
 mining and other disciplines as well as smoothly introducing 
 the reader to R and its power. It addresses data 
 pre-processing techniques, data visualization, model 
 construction (yes, linear regression but also regression 
 trees), and model evaluation, selection and combination, so I 
 think it is a bit incorrect to say that it is about linear 
 regression that corresponds to 5 of the 50 pages of that chapter.
 
 The third (unfinished) chapter (2nd case study) is about 
 financial trading. It includes topics like connections to 
 data bases as well as many other components of a knowledge 
 discovery process. Among those components it includes model 
 construction that involves obviously time series models given 
 the nature of the data. The chapter will include other steps 
 like issues concerning moving from predictions into actions, 
 creation of variables from the original time series, etc.. It 
 is currently being re-written and I expect to upload soon a 
 new revised version of this chapter.
 
 The book will include at least two further cases studies that 
 will be larger. Still, I would note that the financial 
 trading case study is potentially very large, as it is a 
 problem where data is constantly growing. The final version 
 of that chapter addresses this issue of having a system that 
 is online in the sense that it is receiving new data in real 
 time (also known as mining data streams in the data mining field).
 
 I'm sorry for being so long, but I think it is dangerous to 
 try to resume around 200 pages of an unfinished work in two 
 lines of text.
 
 Still, all comments on this on going project are very well 
 welcome and I would like to take this opportunity to thank 
 all people that have been sending me encouraging comments/emails.
 
 Luis Torgo
 
 --
 Luis Torgo
 FEP/LIACC, University of Porto   Phone : (+351) 22 607 88 30
 Machine Learning Group   Fax   : (+351) 22 600 36 54
 R. Campo Alegre, 823 email : [EMAIL PROTECTED]
 4150 PORTO   -  PORTUGAL WWW   : 
 http://www.liacc.up.pt/~ltorgo
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 

Vadim __
Vadim [EMAIL PROTECTED] mailing list
Vadim https://stat.ethz.ch/mailman/listinfo/r-help
Vadim PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html


[R] Testing for normality of residuals in a regression model

2004-10-15 Thread Federico Gherardini
Hi all,
Is it possible to have a test value for assessing the normality of 
residuals from a linear regression model, instead of simply relying on 
qqplots?
I've tried to use fitdistr to try and fit the residuals with a normal 
distribution, but fitdsitr only returns the parameters of the 
distribution and the standard errors, not the p-value. Am I missing 
something?

Cheers,
Federico
__
[EMAIL PROTECTED] 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] cluster analysis

2004-10-15 Thread James Foadi
On Friday 15 Oct 2004 11:02 am, you wrote:


 or unname(classi) -- which is slightly more expressive in this
 case and possibly more desirable in other situations.

 Martin Maechler, ETH Zurich


Thanks, Martin.
I've tried, like you suggested:

un_classi - unname(classi)

but nothing changed. By typing, for instance:

un_classi[[1]]

I still obtained twice the values. But, if I type:

un_classe_01 - unname(classi[[1]])

the un_classe_01 is an unnamed vector.

Cheers,

james
-- 
Dr James Foadi
Structural Biology Laboratory
Department of Chemistry
University of York
YORK YO10 5YW
UK

__
[EMAIL PROTECTED] 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] Re: Testing for normality of residuals in a regression model

2004-10-15 Thread Vito Ricci
Dear Federico,

see:  
? shapiro.test(stats) Shapiro-Wilk Normality Test
and 
? jarque.bera.test(tseries)  
Jarque-Bera Test

They are the most common tests used for normality
testing.

Ciao
Vito



Federico Gherardini wrote on Fri Oct 15 14:44:18 CEST
2004:

Hi all,

Is it possible to have a test value for assessing the
normality of 
residuals from a linear regression model, instead of
simply relying on 
qqplots?
I've tried to use fitdistr to try and fit the
residuals with a normal 
distribution, but fitdsitr only returns the parameters
of the 
distribution and the standard errors, not the p-value.
Am I missing 
something?

Cheers,

Federico



=
Diventare costruttori di soluzioni

The business of the statistician is to catalyze 
the scientific learning process.  
George E. P. Box


Visitate il portale http://www.modugno.it/
e in particolare la sezione su Palese http://www.modugno.it/archivio/cat_palese.shtml

__
[EMAIL PROTECTED] 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] Testing for normality of residuals in a regression model

2004-10-15 Thread Stefano Calza
What about shapiro.test(resid(fit.object))

Stefano

On Fri, Oct 15, 2004 at 02:44:18PM +0200, Federico Gherardini wrote:
 Hi all,
 
 Is it possible to have a test value for assessing the normality of 
 residuals from a linear regression model, instead of simply relying on 
 qqplots?
 I've tried to use fitdistr to try and fit the residuals with a normal 
 distribution, but fitdsitr only returns the parameters of the 
 distribution and the standard errors, not the p-value. Am I missing 
 something?
 
 Cheers,
 
 Federico
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html

__
[EMAIL PROTECTED] 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] length with missing values

2004-10-15 Thread Luis Rideau Cruz
R-help

I have a martix with missing values( in which I want the sample size by
column)
When I :

apply(matrix,2,length)

I get the length of the vector regardless of missing values.
I can't pass an argument to length in apply.

Alternatively I could 

ifelse ( is.na ( matrix [, columns in matrix  ] ) , 0 , 1)

Is there any easier way?

Thank you

__
[EMAIL PROTECTED] 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] Testing for normality of residuals in a regression model

2004-10-15 Thread Dimitris Rizopoulos
Hi Frederico,
take also a look at the package nortest:
help(package=nortest)
Best,
Dimitris

Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/16/396887
Fax: +32/16/337015
Web: http://www.med.kuleuven.ac.be/biostat/
http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm.
- Original Message - 
From: Federico Gherardini [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 15, 2004 2:44 PM
Subject: [R] Testing for normality of residuals in a regression model


Hi all,
Is it possible to have a test value for assessing the normality of 
residuals from a linear regression model, instead of simply relying 
on qqplots?
I've tried to use fitdistr to try and fit the residuals with a 
normal distribution, but fitdsitr only returns the parameters of the 
distribution and the standard errors, not the p-value. Am I missing 
something?

Cheers,
Federico
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html

__
[EMAIL PROTECTED] 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] Filling polygons with points

2004-10-15 Thread Adrian Baddeley

[EMAIL PROTECTED] wrote :

 Are there any possibilities to fill a polygon with a point pattern or
 with a symbol pattern like '+' oder '-' instead of shading lines?

In `spatstat' there is code for testing whether points belong to
a spatial region. The region can consist of any number of polygons,
and the polygons may have holes, etc.

While splancs has similar functionality, spatstat additionally allows regions
defined by a binary image (e.g. a digital approximation to a circle). 

The code is available both as a function inside.owin(x,y,win)
and as a method for [ for point pattern objects.

Example of [:

library(spatstat)
data(demopat)
w - demopat$window   # an irregular polygonal window
plot(w)

g - as.mask(w, dimyx=c(20,20))   # make a 20 x 20 grid
# enclosing the window

g - as.mask(w, eps = 200)   # or set absolute grid spacing 200

p - ppp(raster.x(g), raster.y(g), window=w)
# convert to point pattern object
p - p[, w]   # clip points to window 

plot(p)
plot(p, pch=+)   # etc


To create a window object use owin() or as.owin().

Adrian Baddeley

__
[EMAIL PROTECTED] 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] length with missing values

2004-10-15 Thread Dimitris Rizopoulos
Hi Luis,
just use:
apply( mat, 2, function(x) length(x[!is.na(x)]) )
I hope it helps.
Best,
Dimitris

Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/16/396887
Fax: +32/16/337015
Web: http://www.med.kuleuven.ac.be/biostat/
http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm

- Original Message - 
From: Luis Rideau Cruz [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 15, 2004 1:01 PM
Subject: [R] length with missing values


R-help
I have a martix with missing values( in which I want the sample 
size by
column)
When I :

apply(matrix,2,length)
I get the length of the vector regardless of missing values.
I can't pass an argument to length in apply.
Alternatively I could
ifelse ( is.na ( matrix [, columns in matrix  ] ) , 0 , 1)
Is there any easier way?
Thank you
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html


__
[EMAIL PROTECTED] 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] length with missing values

2004-10-15 Thread Ian Smith
Hi Luis,

Are you looking for the number of missings in each column?  If so, try
this:-

 bob-matrix(c(2:4, NA, 5:7, NA), ncol=2)
 colSums(is.na(bob))
[1] 1 1

Hope this helps,
Ian.

mangosolutions
R Consulting and Training Services
Tel +44 118 902 6620
Fax +44 118 902 6401

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Luis Rideau Cruz
Sent: 15 October 2004 12:01
To: [EMAIL PROTECTED]
Subject: [R] length with missing values

R-help

I have a martix with missing values( in which I want the sample size by
column)
When I :

apply(matrix,2,length)

I get the length of the vector regardless of missing values.
I can't pass an argument to length in apply.

Alternatively I could 

ifelse ( is.na ( matrix [, columns in matrix  ] ) , 0 , 1)

Is there any easier way?

Thank you

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html


[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] 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] length with missing values

2004-10-15 Thread Peter Dalgaard
Dimitris Rizopoulos [EMAIL PROTECTED] writes:

 Hi Luis,
 
 just use:
 
 apply( mat, 2, function(x) length(x[!is.na(x)]) )


or:

apply(!is.na(mat),2,sum)

-- 
   O__   Peter Dalgaard Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics 2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark  Ph: (+45) 35327918
~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907

__
[EMAIL PROTECTED] 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] length with missing values

2004-10-15 Thread Dimitris Rizopoulos
or even:
colSums(!is.na(mat))
Best,
Dimitris
- Original Message - 
From: Peter Dalgaard [EMAIL PROTECTED]
To: Dimitris Rizopoulos [EMAIL PROTECTED]
Cc: Luis Rideau Cruz [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, October 15, 2004 1:43 PM
Subject: Re: [R] length with missing values


Dimitris Rizopoulos [EMAIL PROTECTED] 
writes:

Hi Luis,
just use:
apply( mat, 2, function(x) length(x[!is.na(x)]) )

or:
apply(!is.na(mat),2,sum)
--
  O__   Peter Dalgaard Blegdamsvej 3
 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen   Denmark  Ph: (+45) 
35327918
~~ - ([EMAIL PROTECTED]) FAX: (+45) 
35327907

__
[EMAIL PROTECTED] 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] length with missing values

2004-10-15 Thread Petr Pikal


On 15 Oct 2004 at 12:01, Luis Rideau Cruz wrote:

 R-help
 
 I have a martix with missing values( in which I want the sample size
 by column) When I :
 
 apply(matrix,2,length)

Hi

Try
apply(matrix, 2, function(x) sum(!is.na(x)))

matrix is reserved word, so it is preferable to use other name for 
your object.

Cheers
Petr

 
 I get the length of the vector regardless of missing values.
 I can't pass an argument to length in apply.
 
 Alternatively I could 
 
 ifelse ( is.na ( matrix [, columns in matrix  ] ) , 0 , 1)
 
 Is there any easier way?
 
 Thank you
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide!
 http://www.R-project.org/posting-guide.html

Petr Pikal
[EMAIL PROTECTED]

__
[EMAIL PROTECTED] 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] length with missing values

2004-10-15 Thread Prof Brian Ripley
On Fri, 15 Oct 2004, Sundar Dorai-Raj wrote:

 Luis Rideau Cruz wrote:
 
  I have a martix with missing values( in which I want the sample size by
  column)
  When I :
  
  apply(matrix,2,length)
  
  I get the length of the vector regardless of missing values.
  I can't pass an argument to length in apply.
  
  Alternatively I could 
  
  ifelse ( is.na ( matrix [, columns in matrix  ] ) , 0 , 1)
  
  Is there any easier way?
  
 
 I think you almost have it:
 
 colSums(ifelse(is.na(x), 0, 1))
 
 will return the number of non-NA elements in each column of x.

colSums(!is.na(x)) is the same, and more obvious, I think.
Remember logical values are coerced to 0/1 in an arithmetical context.


-- 
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

__
[EMAIL PROTECTED] 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] R plot problems

2004-10-15 Thread Henric Nilsson
At 10:51 2004-10-15 +0100, you wrote:
If you are using base grafics, you use the argument srt (see help(par)),
How do you get a, say, 45 degree rotation of the axis labels using `srt'? 
The help page for par's `las' argument says

Note that other string/character rotation (via argument srt to par) does 
not affect the axis labels

Henric
__
[EMAIL PROTECTED] 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] Testing for normality of residuals in a regression model

2004-10-15 Thread John Fox
Dear Federico,

A problem with applying a standard test of normality to LS residuals is that
the residuals are correlated and heterskedastic even if the standard
assumptions of the model hold. In a large sample, this is unlikely to be
problematic (unless there's an unusual data configuration), but in a small
sample the effect could be nontrivial.

One approach is to use BLUS residuals, which transform the LS residuals to a
smaller set of uncorrelated, homoskedastic residuals (assuming the
correctness of the model). A search of R resources didn't turn up anything
for BLUS, but they shouldn't be hard to compute. This is a standard topic
covered in many econometrics texts.

You might consider the alternative of generating a bootstrapped confidence
envelope for the QQ plot; the qq.plot() function in the car package will do
this for a linear model.

I hope this helps,
 John


John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox 
 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Federico Gherardini
 Sent: Friday, October 15, 2004 7:44 AM
 To: [EMAIL PROTECTED]
 Subject: [R] Testing for normality of residuals in a regression model
 
 Hi all,
 
 Is it possible to have a test value for assessing the 
 normality of residuals from a linear regression model, 
 instead of simply relying on qqplots?
 I've tried to use fitdistr to try and fit the residuals with 
 a normal distribution, but fitdsitr only returns the 
 parameters of the distribution and the standard errors, not 
 the p-value. Am I missing something?
 
 Cheers,
 
 Federico
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html

__
[EMAIL PROTECTED] 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] R plot problems

2004-10-15 Thread Marc Schwartz
On Fri, 2004-10-15 at 07:18, Henric Nilsson wrote:
 At 10:51 2004-10-15 +0100, you wrote:
 
 If you are using base grafics, you use the argument srt (see help(par)),
 
 How do you get a, say, 45 degree rotation of the axis labels using `srt'? 
 The help page for par's `las' argument says
 
 Note that other string/character rotation (via argument srt to par) does 
 not affect the axis labels
 
 Henric

See the new R FAQ:

7.27 How can I create rotated axis labels?

HTH,

Marc Schwartz

__
[EMAIL PROTECTED] 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] cluster analysis

2004-10-15 Thread Martin Maechler
 James == James Foadi [EMAIL PROTECTED]
 on Fri, 15 Oct 2004 11:36:14 +0100 writes:

James On Friday 15 Oct 2004 11:02 am, you wrote:
 
 or unname(classi) -- which is slightly more expressive in this
 case and possibly more desirable in other situations.
 
 Martin Maechler, ETH Zurich
 

James Thanks, Martin.
James I've tried, like you suggested:

James un_classi - unname(classi)

James but nothing changed. By typing, for instance:

James un_classi[[1]]

of course -- I just chimed in with Christian who proposed as.vector(.)
Since your 'classi' is a list with named vector as components,
you'd need something like

  un_classi - lapply(classi, unname)

I'm sorry to have added more confusion.
OTOH, really, I think you should learn a bit more about basic
manipulation of R objects and study something like
An Introduction to R.

Regards, Martin


James I still obtained twice the values. But, if I type:

James un_classe_01 - unname(classi[[1]])

James the un_classe_01 is an unnamed vector.

(exactly, since it works on the *component* of a list)

James Cheers,

James james

__
[EMAIL PROTECTED] 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] R plot problems

2004-10-15 Thread Liaw, Andy
Use text(), for which srt will work.  As an example:

plot(rnorm(20), rnorm(20), xaxt=n)
text(-2:2, rep(par(usr)[3], 5), 
 c(negative two, negative one, zero, one, two),
 srt=45, xpd=NA, adj=1)

HTH,
Andy

 From: Henric Nilsson
 
 At 10:51 2004-10-15 +0100, you wrote:
 
 If you are using base grafics, you use the argument srt (see 
 help(par)),
 
 How do you get a, say, 45 degree rotation of the axis labels 
 using `srt'? 
 The help page for par's `las' argument says
 
 Note that other string/character rotation (via argument srt 
 to par) does 
 not affect the axis labels
 
 Henric
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 


__
[EMAIL PROTECTED] 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] C/C++

2004-10-15 Thread Adaikalavan Ramasamy
Have you checked Section 5.14 (page 64) of R-extension titled Using
these functions in your own C code.

Section 5.7 tells you about some of the available subroutines. 



On Fri, 2004-10-15 at 01:31, doktora v wrote:
 Hey everyone,
 
 I have been looking for a while for ways to integrate R's wonderful
 functions into my C++ software, but I have not found anything
 concrete.
 
 So finally, i post to this list to see if anyouse else knows about
 this, or has done it!? Is it possible? Are there C++ or C R libraries?
 Or is it sufficiently easy to build them?
 
 your help is much appreciated!
 thanks
 doktora
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


__
[EMAIL PROTECTED] 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] edit plots from the ADE4 package

2004-10-15 Thread Rafael Gutierrez
Dear R-Help

i have a newbie question, how edit size fonts and colors in the plots  (scatter.acm or 
dudi.acm function) of multiple correspondence analysis in the ADE4 Package?

thanks?


Rafael Gutierrez
Estadístico
Unidad de Tecnología Cerro Matoso S.A.
Tel. 4-7723350  Fax. 4-7723236

*

Este correo y sus anexos pueden ser confidenciales y estar protegidos por derechos de 
autor.

Estan dirigidos unica y exclusivamente para uso de el (los) destinatario(s). 

Si Usted por error lo ha recibido por favor notifiquelo inmediatamente al remitente y 
destruyalo de su sistema.

No debe copiar, ni imprimir, ni distribuir este correo o sus anexos, ni usarlos para 
proposito alguno ni dar a conocer su contenido a persona alguna.

Las opiniones, conclusiones y otra informacion contenida en este correo no 
relacionadas con el negocio oficial de Cerro Matoso, deben entenderse como personales 
y de ninguna manera son avaladas por la Compañia.

*

This message and any attachments may be confidential and may...{{dropped}}

__
[EMAIL PROTECTED] 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] constrained splines in GLM

2004-10-15 Thread Mayeul KAUFFMANN
Hi,
I would like to use constrained splines in a GLM model (Poisson link)
to take into account the nonlinear effect of some covariate. The
constraints I need are described below.
I have several variables that I need concurrently in the same model.

I looked at package mgcv but I do not know if/how I can use it in GLM (not
GAM) : I could
not manage to adapt the mono.con(mgcv) example to GLM.
The help for package fda is not complete.
Not sure that backSpline(splines) does what I need.
isoreg (modreg) seems to do univariate regressions.


Some of my covariates are linear.

Three covariates (x1,x2 and x3) must be transformed in a decreasing and
convex way like

this:

|o
|o
| o
|  o
|o
|o
|   o
|-

Currently, I use exp(-x1/alpha1)+exp(-x2/alpha2)+exp(-x3/alpha3), I try
several alpha's

and choose the best according to log-likelihood.


One variable should have only one local maximum (that is, the derivative
should be zero

only once, which is at the top), like this:
|
|  TOP
|  oo
|  o  o
|o  o
|o o o
| o o
|

with bs() or ns() and no constraint, I get:
|
|  TOP
|  oo
|o  o o
|  o o  o
|o
| o o
|
which is nonsense (note there are very few observations on the left part)


I also tried some parametric forms, choosing via log-likelihood. But with
four covariates,

it is a lot of parameters to try (several hours with little flexible
functions).



I am looking for something similar to ns or bs (package splines), which
are very

convenient to place in the formula of a GLM model. I tried them, adjusting
knots, but

could not manage what I want. Constraints on some derivatives may do the
trick, but I do

not know how to implement them in R.

Any help or comment would be greatly appreciated !

Mayeul KAUFFMANN
Université Pierre Mendès France - Grenoble
France

__
[EMAIL PROTECTED] 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] Testing for normality of residuals in a regression model

2004-10-15 Thread Federico Gherardini
Thank you very much for your suggestions! The residuals come from a gls 
model, because I had to correct for heteroscedasticity using a weighted 
regression... can I simply apply one of these tests (like shapiro.test) 
to the standardized residuals from my gls model?

Cheers,
Federico
__
[EMAIL PROTECTED] 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] pdf device --- axes labels text disappeared?

2004-10-15 Thread ivo_welch-rstat8783
Dear R Wizards:  Running R 1.9.1. on amd64.
Promise- c(0,20,40); Expect- c(0, 20, 0.2*20+.8*40 );
# this omits printing numbers on the axes labels.
pdf(file = bug.pdf );
plot(Promise, Expect, type=b, ylim=c(0,60));
dev.off();
# this works
postscript(file = bug.eps );
plot(Promise, Expect, type=b, ylim=c(0,60));
dev.off();
apologies if this has already been noted elsewhere---I looked but did 
not find it.  (probably googled for the wrong terms, if so.)  is this 
my bug, or R's bug or my R installation bug?  help appreciated.

/iaw
__
[EMAIL PROTECTED] 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] Testing for normality of residuals in a regression model

2004-10-15 Thread Kjetil Brinchmann Halvorsen
John Fox wrote:
Dear Federico,
A problem with applying a standard test of normality to LS residuals is that
the residuals are correlated and heterskedastic even if the standard
assumptions of the model hold. In a large sample, this is unlikely to be
problematic (unless there's an unusual data configuration), but in a small
sample the effect could be nontrivial.
One approach is to use BLUS residuals, which transform the LS residuals to a
smaller set of uncorrelated, homoskedastic residuals (assuming the
correctness of the model).
I'm not sure if this are BLUE residuals, but the following function 
transform to a
smaller set of independent, homoscedastic residuals and the calls 
shapiro.test:
I've proposed to make this a method for shapiro.test for lm objects, 
but it is
not accepted.

shapiro.test.lm
function (obj)
{
   eff - effects(obj)
   rank - obj$rank
   df.r - obj$df.residual
   if (df.r  3)
   stop(To few degrees of freedom for residual for the test.)
   data.name - deparse(substitute(obj))
   x - eff[-(1:rank)]
   res - shapiro.test(x)
   res$data.name - data.name
   res$method - paste(res$method,  for residuals of linear model)
   res
}
Kjetil

A search of R resources didn't turn up anything
for BLUS, but they shouldn't be hard to compute. This is a standard topic
covered in many econometrics texts.
You might consider the alternative of generating a bootstrapped confidence
envelope for the QQ plot; the qq.plot() function in the car package will do
this for a linear model.
I hope this helps,
John

John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox 
 

 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of 
Federico Gherardini
Sent: Friday, October 15, 2004 7:44 AM
To: [EMAIL PROTECTED]
Subject: [R] Testing for normality of residuals in a regression model

Hi all,
Is it possible to have a test value for assessing the 
normality of residuals from a linear regression model, 
instead of simply relying on qqplots?
I've tried to use fitdistr to try and fit the residuals with 
a normal distribution, but fitdsitr only returns the 
parameters of the distribution and the standard errors, not 
the p-value. Am I missing something?

Cheers,
Federico
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html
   

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
 


--
Kjetil Halvorsen.
Peace is the most effective weapon of mass construction.
  --  Mahdi Elmandjra
__
[EMAIL PROTECTED] 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] Testing for normality of residuals in a regression model

2004-10-15 Thread Kjetil Brinchmann Halvorsen
John Fox wrote:
Dear Federico,
A problem with applying a standard test of normality to LS residuals is that
the residuals are correlated and heterskedastic even if the standard
assumptions of the model hold. In a large sample, this is unlikely to be
problematic (unless there's an unusual data configuration), but in a small
sample the effect could be nontrivial.
One approach is to use BLUS residuals, which transform the LS residuals to a
smaller set of uncorrelated, homoskedastic residuals (assuming the
correctness of the model). A search of R resources didn't turn up anything
for BLUS, but they shouldn't be hard to compute. This is a standard topic
covered in many econometrics texts.
You might consider the alternative of generating a bootstrapped confidence
envelope for the QQ plot; the qq.plot() function in the car package will do
this for a linear model.
I hope this helps,
John

John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox 
 

 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of 
Federico Gherardini
Sent: Friday, October 15, 2004 7:44 AM
To: [EMAIL PROTECTED]
Subject: [R] Testing for normality of residuals in a regression model

Hi all,
Is it possible to have a test value for assessing the 
normality of residuals from a linear regression model, 
instead of simply relying on qqplots?
I've tried to use fitdistr to try and fit the residuals with 
a normal distribution, but fitdsitr only returns the 
parameters of the distribution and the standard errors, not 
the p-value. Am I missing something?

Cheers,
Federico
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html
   

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
 


--
Kjetil Halvorsen.
Peace is the most effective weapon of mass construction.
  --  Mahdi Elmandjra
__
[EMAIL PROTECTED] 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] Problems saving a graphic

2004-10-15 Thread Talita Leite
Hi!
I'm with a little problem when saving a graphic into pdf. The graphic has 
the label: Milhões de toneladas. The problem is with the accent. After I 
save the graphic into pdf the õ doesn't appear.
Somebody could help me?

Thanks,
Talita Perciano Costa Leite
Graduanda em Ciência da Computação
Universidade Federal de Alagoas - UFAL
Departamento de Tecnologia da Informação - TCI
Construção de Conhecimento por Agrupamento de Dados - CoCADa
__
[EMAIL PROTECTED] 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] edit plots from the ADE4 package

2004-10-15 Thread Trujillo L.
Hi

Try to change the parameters in the s.class function corresponding to col (which is 1 
by default) and using the parameter font as a small positive integer determining a 
text font for characters and hence an interline spacing.

Leonardo Trujillo
Southamtpton Statistical Sciences Research Institute
[EMAIL PROTECTED]  

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rafael Gutierrez
Sent: 15 October 2004 14:54
To: [EMAIL PROTECTED]
Subject: [R] edit plots from the ADE4 package

Dear R-Help

i have a newbie question, how edit size fonts and colors in the plots  (scatter.acm or 
dudi.acm function) of multiple correspondence analysis in the ADE4 Package?

thanks?


Rafael Gutierrez
Estadístico
Unidad de Tecnología Cerro Matoso S.A.
Tel. 4-7723350  Fax. 4-7723236

*

Este correo y sus anexos pueden ser confidenciales y estar protegidos por derechos de 
autor.

Estan dirigidos unica y exclusivamente para uso de el (los) destinatario(s). 

Si Usted por error lo ha recibido por favor notifiquelo inmediatamente al remitente y 
destruyalo de su sistema.

No debe copiar, ni imprimir, ni distribuir este correo o sus anexos, ni usarlos para 
proposito alguno ni dar a conocer su contenido a persona alguna.

Las opiniones, conclusiones y otra informacion contenida en este correo no 
relacionadas con el negocio oficial de Cerro Matoso, deben entenderse como personales 
y de ninguna manera son avaladas por la Compañia.

*

This message and any attachments may be confidential and may...{{dropped}}

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

__
[EMAIL PROTECTED] 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] does rpart has similar function as edit.tree?

2004-10-15 Thread Auston Wei
Hi, list,

The 'tree' package has edit.tree to change split variables by user. 
Does 'rpart' package have something similar? I couldn't find either in the 
manual or archive. Thanks in advance.

Best,
Auston

__
[EMAIL PROTECTED] 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] pdf device --- axes labels text disappeared?

2004-10-15 Thread Pfaff, Bernhard
 Dear R Wizards:  Running R 1.9.1. on amd64.
 
 
 Promise- c(0,20,40); Expect- c(0, 20, 0.2*20+.8*40 );
 
 # this omits printing numbers on the axes labels.
 pdf(file = bug.pdf );
 plot(Promise, Expect, type=b, ylim=c(0,60));
 dev.off();
 
 # this works
 postscript(file = bug.eps );
 plot(Promise, Expect, type=b, ylim=c(0,60));
 dev.off();
 

Dear Ivo,

although I do not want to consider myself as an R wizard, but rather a
helpful soul and because you have provided R-code suited for direct
execution as it should be :-), here is my answer:

in both devices the numbers are printed below the axes. This is on:

platform i386-pc-mingw32
arch i386   
os   mingw32
system   i386, mingw32  
status  
major2  
minor0.0
year 2004   
month10 
day  04 
language R  


HTH,
Bernhard

ps: Could the problem be related to your pdf encodings?
 
 apologies if this has already been noted elsewhere---I looked but did 
 not find it.  (probably googled for the wrong terms, if so.)  is this 
 my bug, or R's bug or my R installation bug?  help appreciated.
 
 /iaw
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 



The information contained herein is confidential and is inte...{{dropped}}

__
[EMAIL PROTECTED] 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] pdf device --- axes labels text disappeared?

2004-10-15 Thread Marc Schwartz
On Fri, 2004-10-15 at 09:13, [EMAIL PROTECTED] wrote:
 Dear R Wizards:  Running R 1.9.1. on amd64.
 
 
 Promise- c(0,20,40); Expect- c(0, 20, 0.2*20+.8*40 );
 
 # this omits printing numbers on the axes labels.
 pdf(file = bug.pdf );
 plot(Promise, Expect, type=b, ylim=c(0,60));
 dev.off();
 
 # this works
 postscript(file = bug.eps );
 plot(Promise, Expect, type=b, ylim=c(0,60));
 dev.off();
 
 
 apologies if this has already been noted elsewhere---I looked but did 
 not find it.  (probably googled for the wrong terms, if so.)  is this 
 my bug, or R's bug or my R installation bug?  help appreciated.
 
 /iaw

Hey Ivo!

No problems here using R 2.0.0 on 32 bit Intel FC2. Both plots are fine.

I don't have a 1.9.1 install at the moment, but I would guess that we
would have heard about the problem prior to this.

That suggests a possible issue with your install or a change of some
sort with 64 bit R. Though again, I suspect other 64 bit users would
have commented on this already...

HTH,

Marc Schwartz

__
[EMAIL PROTECTED] 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 number characters

2004-10-15 Thread Gabor Grothendieck

Note that there are also regexp classes that define certain character
sets, most notably [:graph:] , which can make it easy to create 
appropriate regexps.  More is in ?regex .

Martin Maechler maechler at stat.math.ethz.ch writes:

: 
:  Spencer == Spencer Graves spencer.graves at pdf.com
:  on Thu, 14 Oct 2004 13:41:24 -0700 writes:
: 
: Spencer   It looks like you have several non-printing
: Spencer characters.  nchar will give you the total number
: Spencer of characters in each character string.
: 
: Spencer strsplit can break character strings into single
: Spencer characters, and %in% can be used to classify
: Spencer them.
: 
: and you give nice coding examples:
: 
: Spencer Consider the following:
:  x - Draszt 0%/1iso8859-15
:  nx - nchar(x)
:  x. - strsplit(x, )
:  length(x.[[1]])
: Spencer [1] 29
:  
:  namechars - c(letters, LETTERS, as.character(0:9), .)
: 
: just to be precise:  If 'namechars' is supposed to mean
: ``characters valid in R object names'', then you should have
: added _ as well:
: 
: namechars - c(letters, LETTERS, as.character(0:9), ., _)
: 
:  punctuation - c(,, !, +, *, , |)
:  legalchars - c(namechars, punctuation)
: 
: and 'legalchars' would have to contain quite a bit more I
: presume, e.g. $,  at , 
: (but that wouldn't have been a reason to write this e-mail..)
: 
:  legalx - lapply(x., function(y)(y %in% legalchars))
:  x.[[1]][!legalx[[1]]]
: Spencer [1]    % / -   
:  
:  sapply(legalx, sum)
: Spencer [1] 17
: 
: Spencer Will this give you ideas about what to do what you want?
: Spencer hope this helps. spencer graves
: 
: (and this too)
: 
: Martin Maechler, ETH Zurich
: 
: 
: Spencer Gabor Grothendieck wrote:
: 
:  Assuming that the problem is that your input file has 
:  additional embedded characters added by the data base
:  program you could try extracting just the text using
:  the UNIX strings program:
:  
:  strings myfile.csv  myfile.txt
:  
:  and see if myfile.txt works with R and if not check out
:  what the differences are between it and the .csv file.
:  
:  Date:   Thu, 14 Oct 2004 11:31:33 -0700 
:  From:   Scott Waichler scott.waichler at pnl.gov
:  To:   r-help at stat.math.ethz.ch 
:  Subject:   [R] Problem with number characters 
:  
:  
:  I am trying to process text fields scanned in from a csv file that is
:  output from the Windows database program FileMakerPro. The characters
:  onscreen look like regular text, but R does not like their underlying 
binary form.
:  For example, one of text fields contains a name and a number, but
:  R recognizes the number as something other than what it appears
:  to be in plain text. The character string Draszt 03 after being
:  read into R using scan and = becomes Draszt 03 where the 3 is 
:  displayed in my R session as a superscript. Here is the result pasted
:  into this email I'm composing in emacs: Draszt 0%/1iso8859-
15
:  Another clue for the knowledgable: when I try to display the vector 
element
:  causing trouble, I get
:  CHARSXP: Draszt 0%/1iso8859-15
:  where again the superscipt part is just 3 in my R session. I'm 
working in
:  Linux, R version 1.9.1, 2004-06-21. Your help will be much 
appreciated.
:  
:  Scott Waichler
:  Pacific Northwest National Laboratory
:  scott.waichler at pnl.gov
: 
: __
: 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
: 
:

__
[EMAIL PROTECTED] 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] Within-Subjects ANOVA TukeyHSD

2004-10-15 Thread Steffen Katzner
Is there a problem with using TukeyHSD for individual comparisons of 
means coming from a within-subjects ANOVA?
I always get: no applicable method for TukeyHSD
Thank you,  Steffen

__
[EMAIL PROTECTED] 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] pdf device --- axes labels text disappeared?

2004-10-15 Thread Prof Brian Ripley
No problems under R 2.0.0 or 1.9.1 on that platform.

Are you *sure* this is a bug in the PDF and not in your pdf reader?
Please read the PDF source file to find out.  Mine has lines like

/F2 1 Tf 12.00 0.00 -0.00 12.00 68.40 47.52 Tm (0) Tj
/F2 1 Tf 12.00 0.00 -0.00 12.00 144.39 47.52 Tm (10) Tj
/F2 1 Tf 12.00 0.00 -0.00 12.00 223.73 47.52 Tm (20) Tj
/F2 1 Tf 12.00 0.00 -0.00 12.00 303.06 47.52 Tm (30) Tj
/F2 1 Tf 12.00 0.00 -0.00 12.00 382.39 47.52 Tm (40) Tj


On Fri, 15 Oct 2004 [EMAIL PROTECTED] wrote:

 
 Dear R Wizards:  Running R 1.9.1. on amd64.
 
 
 Promise- c(0,20,40); Expect- c(0, 20, 0.2*20+.8*40 );
 
 # this omits printing numbers on the axes labels.
 pdf(file = bug.pdf );
 plot(Promise, Expect, type=b, ylim=c(0,60));
 dev.off();
 
 # this works
 postscript(file = bug.eps );
 plot(Promise, Expect, type=b, ylim=c(0,60));
 dev.off();
 
 
 apologies if this has already been noted elsewhere---I looked but did 
 not find it.  (probably googled for the wrong terms, if so.)  is this 
 my bug, or R's bug or my R installation bug?  help appreciated.
 
 /iaw
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
 
 

-- 
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

__
[EMAIL PROTECTED] 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] pdf device --- axes labels text disappeared?

2004-10-15 Thread Christopher Swingley
/iaw,

* [EMAIL PROTECTED] [2004-Oct-15 06:13 AKDT]:
 Dear R Wizards:  Running R 1.9.1. on amd64.
 
 Promise- c(0,20,40); Expect- c(0, 20, 0.2*20+.8*40 );
 
 # this omits printing numbers on the axes labels.
 pdf(file = bug.pdf );
 plot(Promise, Expect, type=b, ylim=c(0,60));
 dev.off();

Version 1.9.1  (2004-06-21), AMD64, Debian amd64 unstable port.

The plot I produced using these commands had all the numbers and lables.  
I used 'xpdf' version 3.00 to display the plot.  Maybe it's your PDF 
viewer, rather than R?

Chris
-- 
Christopher S. Swingley  email: [EMAIL PROTECTED] (work)
Intl. Arctic Research Center[EMAIL PROTECTED] (personal)
University of Alaska Fairbanks   www.frontier.iarc.uaf.edu/~cswingle/

__
[EMAIL PROTECTED] 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] one more Rcmdr problem

2004-10-15 Thread Erich Neuwirth
I did experience the same problem.
After installing R 2.0.0 patched and downloading the source for
Rcmdr_0.99-12 from John Fox's Web page
http://socserv.socsci.mcmaster.ca/jfox/Misc/Rcmdr/
and recompiling the package
it now works.
Ctrl-C, Ctrl-X, and Ctrl-V,  in the text boxes of Rcmdr now work.

Adrian Dusa wrote:
Hello,
I'm using R 2.0.0 with the latest Rcmdr package installed from CRAN, on
Windows XP Professional.
When trying to copy some commands or results, either from the upper or lower
text window, this causes Rcmdr to crash:
R for Windows GUI front-end has encountered a problem and needs to close
Did anyone have the same problem? I don't think it's my system, as it
happened to reinstall my Windows just a few days ago, and the same problem
occurred in the former one.
Regards,
Adrian

Adrian Dusa
Romanian Social Data Archive
1 Schitu Magureanu Bd.
050025 Bucharest sector 5
Tel. +40 21 3126618\
 +40 21 3153122/ int.101


--
Erich Neuwirth, Computer Supported Didactics Working Group
Visit our SunSITE at http://sunsite.univie.ac.at
Phone: +43-1-4277-38624 Fax: +43-1-4277-9386
__
[EMAIL PROTECTED] 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] Testing for normality of residuals in a regression model

2004-10-15 Thread Federico Gherardini
Berton Gunter wrote:
Quite right, John!
I have 2 additional questions:
1) Why test for normality of residuals? Suppose you reject -- then what?
(residual plots may give information on skewness, multi-modality, data
anomalies that can affect the data analysis).
 

Because I want to know if my model satisfies the basic assumptions of 
regression theory... in other words I want to know if I can trust my 
model.

Cheers,
Federico
2) Why test for normality? Is it EVER useful? Suppose you reject -- then
what?
(I am tempted to add a 3rd question -- why test at all? -- but that is
perhaps too iconoclastic and certainly off topic. Let the hounds remain
leashed for now.)
Cheers,
-- Bert Gunter
Genentech Non-Clinical Statistics
South San Francisco, CA
 

__
[EMAIL PROTECTED] 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] pdf device --- axes labels text disappeared?

2004-10-15 Thread ivo_welch-rstat8783
Hi:  Thank you everyone.  You were all correct.  This turns out to be a 
viewer bug---and even more likely a viewer installation bug, not an 
xpdf bug, much less an R bug.  Apologies for having wasted everyone's 
time.

Regards, /ivo
---
ivo welch
__
[EMAIL PROTECTED] 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 number characters

2004-10-15 Thread Mike Prager
Scott,
Has anyone suggested yet that some options might need adjusting in the 
Windows program that wrote the file?  In my experience, CSV files from 
Windows applications are typically pure ASCII (though yours clearly isn't).

Another possibility is that the program can export in plain ASCII with the 
fields in set positions.  Sometimes that can be done by capturing output 
intended for basic printers.  Either of those approaches might be simpler 
than trying to fiddle with the quirky output provided.  Reverse engineering 
is error prone.

MHP
At 10/15/2004 10:47 AM Friday, you wrote:
Note that there are also regexp classes that define certain character
sets, most notably [:graph:] , which can make it easy to create
appropriate regexps.  More is in ?regex .
Martin Maechler maechler at stat.math.ethz.ch writes:
:
:  Spencer == Spencer Graves spencer.graves at pdf.com
:  on Thu, 14 Oct 2004 13:41:24 -0700 writes:
:
: Spencer   It looks like you have several non-printing
: Spencer characters.  nchar will give you the total number
: Spencer of characters in each character string.
:
: Spencer strsplit can break character strings into single
: Spencer characters, and %in% can be used to classify
: Spencer them.
:
: and you give nice coding examples:
:
: Spencer Consider the following:
:  x - Draszt 0%/1€Œiso8859-15³
:  nx - nchar(x)
:  x. - strsplit(x, )
:  length(x.[[1]])
: Spencer [1] 29
: 
:  namechars - c(letters, LETTERS, as.character(0:9), .)
:
: just to be precise:  If 'namechars' is supposed to mean
: ``characters valid in R object names'', then you should have
: added _ as well:
:
: namechars - c(letters, LETTERS, as.character(0:9), ., _)
:
:  punctuation - c(,, !, +, *, , |)
:  legalchars - c(namechars, punctuation)
:
: and 'legalchars' would have to contain quite a bit more I
: presume, e.g. $,  at , 
: (but that wouldn't have been a reason to write this e-mail..)
:
:  legalx - lapply(x., function(y)(y %in% legalchars))
:  x.[[1]][!legalx[[1]]]
: Spencer [1]% /  €  Œ -   ³
: 
:  sapply(legalx, sum)
: Spencer [1] 17
:
: Spencer Will this give you ideas about what to do what you want?
: Spencer hope this helps. spencer graves
:
: (and this too)
:
: Martin Maechler, ETH Zurich
:
:
: Spencer Gabor Grothendieck wrote:
:
:  Assuming that the problem is that your input file has
:  additional embedded characters added by the data base
:  program you could try extracting just the text using
:  the UNIX strings program:
: 
:  strings myfile.csv  myfile.txt
: 
:  and see if myfile.txt works with R and if not check out
:  what the differences are between it and the .csv file.
: 
:  Date:   Thu, 14 Oct 2004 11:31:33 -0700
:  From:   Scott Waichler scott.waichler at pnl.gov
:  To:   r-help at stat.math.ethz.ch
:  Subject:   [R] Problem with number characters
: 
: 
:  I am trying to process text fields scanned in from a csv file that is
:  output from the Windows database program FileMakerPro. The characters
:  onscreen look like regular text, but R does not like their 
underlying
binary form.
:  For example, one of text fields contains a name and a number, but
:  R recognizes the number as something other than what it appears
:  to be in plain text. The character string Draszt 03 after being
:  read into R using scan and = becomes Draszt 03 where the 3 is
:  displayed in my R session as a superscript. Here is the result pasted
:  into this email I'm composing in emacs: Draszt 0%/1€Œiso8859-
15³
:  Another clue for the knowledgable: when I try to display the vector
element
:  causing trouble, I get
:  CHARSXP: Draszt 0%/1€Œiso8859-15³
:  where again the superscipt part is just 3 in my R session. I'm
working in
:  Linux, R version 1.9.1, 2004-06-21. Your help will be much
appreciated.
: 
:  Scott Waichler
:  Pacific Northwest National Laboratory
:  scott.waichler at pnl.gov
:
: __
: 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
:
:

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

--
Michael Prager
NOAA Center for Coastal Fisheries and Habitat Research
Beaufort, North Carolina  28516  USA
http://shrimp.ccfhrb.noaa.gov/~mprager/
NOTE: Opinions expressed are personal, not official. No government
endorsement of any product is made or implied.
__
[EMAIL PROTECTED] 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] add-on package/windows installation probLem

2004-10-15 Thread Nebahat Noyan
Hi,

I have tried to download the bootstrap.tar.gz from the website below:

http://cran.r-project.org/src/contrib/Old/0.50/INDEX.html

I have extracted the folder to a zip file...and then use the load packages from local 
zip files.
I use R2.0.0.0 and windows NT, i get the error:

1: error -1 in extracting from zip file 
2: cannot open file `bootstrap/DESCRIPTION' 

ALso, when i use R CMD INSTALL with the package name bootstrap.tar.gz it gives a 
syntax error.
Can you help me with this pLease?

Sincere Regards,
Neba Noyan
Research Assistant
Center for Advanced Infrastructure and Transportation Institute
Rutgers University

P.S:
ReLated solutions  in the mailing List are below:

 solved : 
 before installing using menu option, go to program files\R\rw1051\library and 
 make a directory pubbias, then install the package from the local zip file 
 option. 

 1) the zip file might have invalid internal structure. Maybe it is 
missing the directory `pubbias' (although the unzip code should cope with 
that, and that's not the error code I would expect). 
2) This is not the first attempt to do something like this, and Windows 
had the location in use. (I have seen that one, and after a reboot it 
worked cleanly.) 
[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] 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] edit plots from the ADE4 package

2004-10-15 Thread Trujillo L.
Hi again,

You could change the size font using the parameter clabel in both functions s.label 
and s.class.

For the typical example in Fine, 1996 you could notice that slabel(acm$co,clabel=1) 
produce different results than 
slabel(acm$co,clabel=0),slabel(acm$co,clabel=0.5),slabel(acm$co,clabel=4). The size of 
the point could be changed using cpoint. 

Using s.class you could use col=seq(length(levels(fac))) (instead change col = rep(1, 
length(levels(fac, which produces different colours according to the illustrative 
factor levels.

Leonardo Trujillo
University of Southampton
Southampton Statistical Sciences Research Institute
[EMAIL PROTECTED]

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rafael Gutierrez
Sent: 15 October 2004 14:54
To: [EMAIL PROTECTED]
Subject: [R] edit plots from the ADE4 package

Dear R-Help

i have a newbie question, how edit size fonts and colors in the plots  (scatter.acm or 
dudi.acm function) of multiple correspondence analysis in the ADE4 Package?

thanks?


Rafael Gutierrez
Estadístico
Unidad de Tecnología Cerro Matoso S.A.
Tel. 4-7723350  Fax. 4-7723236

*

Este correo y sus anexos pueden ser confidenciales y estar protegidos por derechos de 
autor.

Estan dirigidos unica y exclusivamente para uso de el (los) destinatario(s). 

Si Usted por error lo ha recibido por favor notifiquelo inmediatamente al remitente y 
destruyalo de su sistema.

No debe copiar, ni imprimir, ni distribuir este correo o sus anexos, ni usarlos para 
proposito alguno ni dar a conocer su contenido a persona alguna.

Las opiniones, conclusiones y otra informacion contenida en este correo no 
relacionadas con el negocio oficial de Cerro Matoso, deben entenderse como personales 
y de ninguna manera son avaladas por la Compañia.

*

This message and any attachments may be confidential and may...{{dropped}}

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

__
[EMAIL PROTECTED] 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] Testing for normality of residuals in a regression model

2004-10-15 Thread Federico Gherardini
Berton Gunter wrote:
Exactly! My point is that normality tests are useless for this purpose for
reasons that are beyond what I can take up here. 

Thanks for your suggestions, I undesrtand that! Could you possibly give 
me some (not too complicated!)
links so that I can investigate this matter further?

Cheers,
Federico
Hints: Balanced designs are
robust to non-normality; independence (especially clustering of subjects
due to systematic effects), not normality is usually the biggest real
statistical problem; hypothesis tests will always reject when samples are
large -- so what!; trust refers to prediction validity which has to do
with study design and the validity/representativeness of the current data to
future. 

I know that all the stats 101 tests say to test for normality, but they're
full of baloney!
Of course, this is free advice -- so caveat emptor!
Cheers,
Bert
 

__
[EMAIL PROTECTED] 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] Building package compatible w/ R v1.9.1 and R v2.0.0?

2004-10-15 Thread Henrik Bengtsson
Hi,

just in the process of updating my packages for R v2.0.0 and I have not had
time to followed the R v2.0.0 discussions so maybe my questions have already
been answered.

A concern I have is that when creating packages they should be backward
compatible with R v1.9.x for a while until all users and computers has
migrated to R v2.0.x. It is pretty straightforward to setup my packages so
that they will *build from source* smoothly under both R v1.9.1 and R
v2.0.0. 

But, is there an easy way to to build a binary (read Windows binary) so that
it will install on R v2.0.0 as well as Rv1.9.1, or do I have to provide
two seperate builds?  

As you already know, current status is that building under R v2.0.0 and
loading in R v1.9.1 gives the error:

Error in firstlib(which.lib.loc, package) :
couldn't find function lazyLoad
In addition: Warning message:
package R.oo was built under R version 2.0.0

and building under R v1.9.1 and loading in R v2.0.0 gives the error:

Error in library(R.oo) : 'R.oo' is not a valid package -- installed  2.0.0?

Just to give it a try, I tried to build the package under R v2.0.0 with
LazyLoad: FALSE in DESCRIPTION, but with the same error.

Best wishes

Henrik Bengtsson

Dept. of Mathematical Statistics @ Centre for Mathematical Sciences 
Lund Institute of Technology/Lund University, Sweden (+2h UTC)
+46 46 2229611 (off), +46 708 909208 (cell), +46 46 2224623 (fax)
h b @ m a t h s . l t h . s e, http://www.maths.lth.se/~hb/

__
[EMAIL PROTECTED] 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] Testing for normality of residuals in a regression model

2004-10-15 Thread Berton Gunter

 
 Berton Gunter wrote:
 
 Exactly! My point is that normality tests are useless for 
 this purpose for
 reasons that are beyond what I can take up here. 
 
 Thanks for your suggestions, I undesrtand that! Could you 
 possibly give 
 me some (not too complicated!)
 links so that I can investigate this matter further?
 
 Cheers,
 
 Federico


1. This was meant as a private reply so I would not roil the list. In
future, when a reply takes a discussion off list, you should keep it off
list, please.

2. The writings of (and personal conversations with) John Tukey and George
Box are certainly primary influences, as are numerous other commentaries
over the year from folks like Leo Breiman, Jerry Friedman, David Freedman,
Persi Diaconis and many others. Box's original paper about robustness to
non-normality was around 1952, I think, but much of what I allude to is
statistical folklore, I think. Perhaps other list contributors might give
you some better specific references. 

Cheers,
Bert

__
[EMAIL PROTECTED] 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] one more Rcmdr problem

2004-10-15 Thread Adrian Dusa
Brilliant. With R 2.0.0 patched and Rcmdr 0.9-12 all problems are gone.
Thank you all, and a special thank you for the R Commander; it saves a lot
of effort for teaching purposes.
Best regards,
Adrian

-Original Message-
From: Erich Neuwirth [mailto:[EMAIL PROTECTED] 
Sent: 15 octombrie 2004 18:27
To: Adrian Dusa
Cc: [EMAIL PROTECTED]
Subject: Re: [R] one more Rcmdr problem

I did experience the same problem.
After installing R 2.0.0 patched and downloading the source for
Rcmdr_0.99-12 from John Fox's Web page
http://socserv.socsci.mcmaster.ca/jfox/Misc/Rcmdr/
and recompiling the package
it now works.

Ctrl-C, Ctrl-X, and Ctrl-V,  in the text boxes of Rcmdr now work.



Adrian Dusa wrote:
 Hello,
 
 I'm using R 2.0.0 with the latest Rcmdr package installed from CRAN, on
 Windows XP Professional.
 
 When trying to copy some commands or results, either from the upper or
lower
 text window, this causes Rcmdr to crash:
 
 R for Windows GUI front-end has encountered a problem and needs to close
 
 Did anyone have the same problem? I don't think it's my system, as it
 happened to reinstall my Windows just a few days ago, and the same problem
 occurred in the former one.
 
 Regards,
 Adrian
 
 
 Adrian Dusa
 Romanian Social Data Archive
 1 Schitu Magureanu Bd.
 050025 Bucharest sector 5
 Tel. +40 21 3126618\
  +40 21 3153122/ int.101
 
 
 


-- 
Erich Neuwirth, Computer Supported Didactics Working Group
Visit our SunSITE at http://sunsite.univie.ac.at
Phone: +43-1-4277-38624 Fax: +43-1-4277-9386



-- 
This message was scanned for spam and viruses by BitDefender
For more information please visit http://linux.bitdefender.com/



-- 
This message was scanned for spam and viruses by BitDefender
For more information please visit http://linux.bitdefender.com/

__
[EMAIL PROTECTED] 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] SJava 0.65 and R 2.0.0 (slightly long)

2004-10-15 Thread Rajarshi Guha
Hi,
  I had some Java code that worked with SJava 0.65 under R 1.8.*. I'm
trying to get it to work with R 2.0.0. My JVM is Sun 1.5.0 (running on
Fedora Core 2)

I downloaded and installed SJava 0.65 in my personal directory using

R CMD INSTALL SJava-0.65.tar.gz -l ~/src/Rlibrary

and before starting R I sourced RJava.bsh. However after loading the
SJava library if  do javaConfig() I get

-

$classPath
[1] /omegahat/Jars/Environment.jar /..
[3] /omegahat/Jars/antlr.jar   /omegahat/Jars/jas.jar
[5] /omegahat/Jars/jhall.jar
 
$properties

EmbeddedInR
 
true
  
InterfaceManagerClass

org/omegahat/Interfaces/NativeInterface/OmegaInterfaceManager
  
ForeignReferenceBaseClass

org/omegahat/R/Java/RForeignReference
  
java.compiler
 
NONE
 
OMEGA_HOME
  
 
OmegahatSearchPath
.,${OMEGA_HOME}/Environment/Scripts/Run,${OMEGA_HOME}/Jars/Environment.jar
  
java.library.path
  
 
$libraryPath
[1] 



and doing .JavaInit() gives me:

JVM (nil) Env (nil)
[1] error initializing manager class Cannot find the Omegahat interface
manager class. Check you classpath!
Error in .JavaInit() : Couldn't start Java Virtual Machine: Cannot find
the Omegahat interface manager class. Check you classpath!

From the output fof javaConfig() I was'nt surprised. However I thought
that the install would set the paths to the OmegaHat interface manager.

So I set the classpath to

/home/rajarshi/src/Rlibrary/SJava/org/omegahat/Jars/../Interfaces: \
/home/rajarshi/src/Rlibrary/SJava/org/omegahat/Jars/../R/Java: \
/home/rajarshi/src/Rlibrary/SJava/org/omegahat/Jars/antlr.jar: \
/home/rajarshi/src/Rlibrary/SJava/org/omegahat/Jars/Environment.jar: \
/home/rajarshi/src/Rlibrary/SJava/org/omegahat/Jars/jas.jar: \
/home/rajarshi/src/Rlibrary/SJava/org/omegahat/Jars/jhall.jar: \
/home/rajarshi/src/Rlibrary/SJava/org/omegahat/Jars/ROmegahatExamples.jar:

and then starting up R and doing javaConfig() I get the same output as
before (except that the above paths are now in the CLASSPATH).

I also noted that the OMEGA_HOME variable is set to . This did not
seem to be right so I tried setting it to 

/home/rajarshi/src/Rlibrary/SJava/org/omegahat

from my shell but on starting up R and loading SJava and running
javaConfig() I see that OMEGA_HOME is still set to 

Does anybody have any pointers as to whats going on? 

(I also tried SJava 0.68, but thought it installs fine and .JavaInit()
works, when I try the example on the SJava download page, my R session
crashes)

---
Rajarshi Guha [EMAIL PROTECTED] http://jijo.cjb.net
GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE
---
I'm related to people I don't relate to.
-Calvin

__
[EMAIL PROTECTED] 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] add-on package/windows installation probLem

2004-10-15 Thread Prof Brian Ripley
You downloaded a .tar.gz file and treated it as a zip file, for some 
reason not in any R documentation.

On Fri, 15 Oct 2004, Nebahat Noyan wrote:

 Hi,
 
 I have tried to download the bootstrap.tar.gz from the website below:
 
 http://cran.r-project.org/src/contrib/Old/0.50/INDEX.html
 
 I have extracted the folder to a zip file...and then use the load
 packages from local zip files. I use R2.0.0.0 and windows NT, i get the
 error:
 
 1: error -1 in extracting from zip file 
 2: cannot open file `bootstrap/DESCRIPTION' 
 
 ALso, when i use R CMD INSTALL with the package name bootstrap.tar.gz it
 gives a syntax error. Can you help me with this pLease?

Perhaps that is because the file you got is for R 0.50, not R 2.0.0 (sic)?
The bootstrap package has been withdrawn and does not work under R 2.0.0 
AFAIK.

 
 Sincere Regards,
 Neba Noyan
 Research Assistant
 Center for Advanced Infrastructure and Transportation Institute
 Rutgers University
 
 P.S:
 ReLated solutions  in the mailing List are below:

They are *not* related.

  solved : 
  before installing using menu option, go to program files\R\rw1051\library and 
  make a directory pubbias, then install the package from the local zip file 
  option. 
 
  1) the zip file might have invalid internal structure. Maybe it is 
 missing the directory `pubbias' (although the unzip code should cope with 
 that, and that's not the error code I would expect). 
 2) This is not the first attempt to do something like this, and Windows 
 had the location in use. (I have seen that one, and after a reboot it 
 worked cleanly.) 
   [[alternative HTML version deleted]]

What does the posting guide say about that?

 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

-- 
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

__
[EMAIL PROTECTED] 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] add-on package/windows installation probLem

2004-10-15 Thread Uwe Ligges
Nebahat Noyan wrote:
Hi,
I have tried to download the bootstrap.tar.gz from the website below:
http://cran.r-project.org/src/contrib/Old/0.50/INDEX.html
0. For sure you are joking ...  
   The package is 7.5 years old (16-Apr-1997) -  too old to be 
installable by recent versions of R. But you might want to look into 
more recent packages on CRAN 

1. Under Windows, you have to INSTALL via R CMD INSTALL with R = 2.0.0 
(if there is no binary version available built with that version).

2. The solution in the mail given below was never the preferable one.
Uwe Ligges


I have extracted the folder to a zip file...and then use the load packages from local 
zip files.
I use R2.0.0.0 and windows NT, i get the error:
1: error -1 in extracting from zip file 
2: cannot open file `bootstrap/DESCRIPTION' 

ALso, when i use R CMD INSTALL with the package name bootstrap.tar.gz it gives a 
syntax error.
Can you help me with this pLease?
Sincere Regards,
Neba Noyan
Research Assistant
Center for Advanced Infrastructure and Transportation Institute
Rutgers University
P.S:
ReLated solutions  in the mailing List are below:

solved : 
before installing using menu option, go to program files\R\rw1051\library and 
make a directory pubbias, then install the package from the local zip file 
option. 

1) the zip file might have invalid internal structure. Maybe it is 
missing the directory `pubbias' (although the unzip code should cope with 
that, and that's not the error code I would expect). 
2) This is not the first attempt to do something like this, and Windows 
had the location in use. (I have seen that one, and after a reboot it 
worked cleanly.) 
[[alternative HTML version deleted]]
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
__
[EMAIL PROTECTED] 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] Building package compatible w/ R v1.9.1 and R v2.0.0?

2004-10-15 Thread Uwe Ligges
Henrik Bengtsson wrote:
Hi,
just in the process of updating my packages for R v2.0.0 and I have not had
time to followed the R v2.0.0 discussions so maybe my questions have already
been answered.
A concern I have is that when creating packages they should be backward
compatible with R v1.9.x for a while until all users and computers has
migrated to R v2.0.x. It is pretty straightforward to setup my packages so
that they will *build from source* smoothly under both R v1.9.1 and R
v2.0.0. 

But, is there an easy way to to build a binary (read Windows binary) so that
it will install on R v2.0.0 as well as Rv1.9.1, or do I have to provide
two seperate builds?  
Yes. Same source might work, but you need separate binaries.
Uwe Ligges

As you already know, current status is that building under R v2.0.0 and
loading in R v1.9.1 gives the error:
Error in firstlib(which.lib.loc, package) :
couldn't find function lazyLoad
In addition: Warning message:
package R.oo was built under R version 2.0.0
and building under R v1.9.1 and loading in R v2.0.0 gives the error:
Error in library(R.oo) : 'R.oo' is not a valid package -- installed  2.0.0?
Just to give it a try, I tried to build the package under R v2.0.0 with
LazyLoad: FALSE in DESCRIPTION, but with the same error.
Best wishes
Henrik Bengtsson
Dept. of Mathematical Statistics @ Centre for Mathematical Sciences 
Lund Institute of Technology/Lund University, Sweden (+2h UTC)
+46 46 2229611 (off), +46 708 909208 (cell), +46 46 2224623 (fax)
h b @ m a t h s . l t h . s e, http://www.maths.lth.se/~hb/

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
__
[EMAIL PROTECTED] 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] one more Rcmdr problem

2004-10-15 Thread John Fox
Dear Adrian,

Since I moved the discussion of this problem to the r-devel list, I should
have reported back to r-help (1) that the problem was general to tlctk (not
just the Rcmdr package), and (2) that Duncan Murdoch made a change to the
patched Windows version of R 2.0.0 that made the problem go away.

Regards,
 John


John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox 
 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Adrian Dusa
 Sent: Friday, October 15, 2004 11:44 AM
 To: 'Erich Neuwirth'; 'John Fox'; 'Duncan Murdoch'
 Cc: [EMAIL PROTECTED]
 Subject: RE: [R] one more Rcmdr problem
 
 Brilliant. With R 2.0.0 patched and Rcmdr 0.9-12 all problems 
 are gone.
 Thank you all, and a special thank you for the R Commander; 
 it saves a lot of effort for teaching purposes.
 Best regards,
 Adrian
 
 -Original Message-
 From: Erich Neuwirth [mailto:[EMAIL PROTECTED]
 Sent: 15 octombrie 2004 18:27
 To: Adrian Dusa
 Cc: [EMAIL PROTECTED]
 Subject: Re: [R] one more Rcmdr problem
 
 I did experience the same problem.
 After installing R 2.0.0 patched and downloading the source for
 Rcmdr_0.99-12 from John Fox's Web page
 http://socserv.socsci.mcmaster.ca/jfox/Misc/Rcmdr/
 and recompiling the package
 it now works.
 
 Ctrl-C, Ctrl-X, and Ctrl-V,  in the text boxes of Rcmdr now work.
 
 
 
 Adrian Dusa wrote:
  Hello,
  
  I'm using R 2.0.0 with the latest Rcmdr package installed 
 from CRAN, 
  on Windows XP Professional.
  
  When trying to copy some commands or results, either from 
 the upper or
 lower
  text window, this causes Rcmdr to crash:
  
  R for Windows GUI front-end has encountered a problem and 
 needs to close
  
  Did anyone have the same problem? I don't think it's my 
 system, as it 
  happened to reinstall my Windows just a few days ago, and the same 
  problem occurred in the former one.
  
  Regards,
  Adrian
  
  
  Adrian Dusa
  Romanian Social Data Archive
  1 Schitu Magureanu Bd.
  050025 Bucharest sector 5
  Tel. +40 21 3126618\
   +40 21 3153122/ int.101
  
  
  
 
 
 --
 Erich Neuwirth, Computer Supported Didactics Working Group 
 Visit our SunSITE at http://sunsite.univie.ac.at
 Phone: +43-1-4277-38624 Fax: +43-1-4277-9386
 
 
 
 -- 
 This message was scanned for spam and viruses by BitDefender
 For more information please visit http://linux.bitdefender.com/
 
 
 
 -- 
 This message was scanned for spam and viruses by BitDefender
 For more information please visit http://linux.bitdefender.com/
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html

__
[EMAIL PROTECTED] 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] Mandrake rpm's for R 2.0.0

2004-10-15 Thread Michele Alzetta
A binary RPM for Mandrake 10.0 official has been uploaded and will
soon be available on CRAN, as well as the SRPM with which users of
other flavours of Mandrake will be able to build (and hopefully
contribute) their own RPM's.

Please read the readme file if you have problems installing.

Downloads are also possible from my homepage:

http://www.webalice.it/michele.alzetta

-- 
Michele Alzetta

__
[EMAIL PROTECTED] 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] Testing for normality of residuals in a regression model

2004-10-15 Thread Liaw, Andy
Let's see if I can get my stat 101 straight:

We learned that linear regression has a set of assumptions:

1. Linearity of the relationship between X and y.
2. Independence of errors.
3. Homoscedasticity (equal error variance).
4. Normality of errors.

Now, we should ask:  Why are they needed?  Can we get away with less?  What
if some of them are not met?

It should be clear why we need #1.

Without #2, I believe the least squares estimator is still unbias, but the
usual estimate of SEs for the coefficients are wrong, so the t-tests are
wrong.

Without #3, the coefficients are, again, still unbiased, but not as
efficient as can be.  Interval estimates for the prediction will surely be
wrong.

Without #4, well, it depends.  If the residual DF is sufficiently large, the
t-tests are still valid because of CLT.  You do need normality if you have
small residual DF.

The problem with normality tests, I believe, is that they usually have
fairly low power at small sample sizes, so that doesn't quite help.  There's
no free lunch:  A normality test with good power will usually have good
power against a fairly narrow class of alternatives, and almost no power
against others (directional test).  How do you decide what to use?

Has anyone seen a data set where the normality test on the residuals is
crucial in coming up with appriate analysis?

Cheers,
Andy

 From: Federico Gherardini
 
 Berton Gunter wrote:
 
 Exactly! My point is that normality tests are useless for 
 this purpose for
 reasons that are beyond what I can take up here. 
 
 Thanks for your suggestions, I undesrtand that! Could you 
 possibly give 
 me some (not too complicated!)
 links so that I can investigate this matter further?
 
 Cheers,
 
 Federico
 
 Hints: Balanced designs are
 robust to non-normality; independence (especially 
 clustering of subjects
 due to systematic effects), not normality is usually the 
 biggest real
 statistical problem; hypothesis tests will always reject 
 when samples are
 large -- so what!; trust refers to prediction validity 
 which has to do
 with study design and the validity/representativeness of 
 the current data to
 future. 
 
 I know that all the stats 101 tests say to test for 
 normality, but they're
 full of baloney!
 
 Of course, this is free advice -- so caveat emptor!
 
 Cheers,
 Bert
 
   
 
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 


__
[EMAIL PROTECTED] 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] Testing for normality of residuals in a regression model

2004-10-15 Thread John Fox
Dear Kjetil,

I don't believe that these are BLUS residuals, but since the last n - r
effects are projections onto an orthogonal basis for the residual
subspace, they should do just fine (as long as the basis vectors have the
same length, which I think is the case, but perhaps someone can confirm).
The general idea is to transform the LS residuals into an uncorrelated,
equal-variance set.

Regards,
 John


John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox 
 

 -Original Message-
 From: Kjetil Brinchmann Halvorsen [mailto:[EMAIL PROTECTED] 
 Sent: Friday, October 15, 2004 9:12 AM
 To: John Fox
 Cc: 'Federico Gherardini'; [EMAIL PROTECTED]
 Subject: Re: [R] Testing for normality of residuals in a 
 regression model
 
 John Fox wrote:
 
 Dear Federico,
 
 A problem with applying a standard test of normality to LS 
 residuals is 
 that the residuals are correlated and heterskedastic even if the 
 standard assumptions of the model hold. In a large sample, this is 
 unlikely to be problematic (unless there's an unusual data 
 configuration), but in a small sample the effect could be nontrivial.
 
 One approach is to use BLUS residuals, which transform the 
 LS residuals 
 to a smaller set of uncorrelated, homoskedastic residuals 
 (assuming the 
 correctness of the model).
 
 I'm not sure if this are BLUE residuals, but the following 
 function transform to a smaller set of independent, 
 homoscedastic residuals and the calls
 shapiro.test:
 I've proposed to make this a method for shapiro.test for lm 
 objects, but it is not accepted.
 
  shapiro.test.lm
 function (obj)
 {
 eff - effects(obj)
 rank - obj$rank
 df.r - obj$df.residual
 if (df.r  3)
 stop(To few degrees of freedom for residual for the test.)
 data.name - deparse(substitute(obj))
 x - eff[-(1:rank)]
 res - shapiro.test(x)
 res$data.name - data.name
 res$method - paste(res$method,  for residuals of linear model)
 res
 }
 
 Kjetil
 
 
  A search of R resources didn't turn up anything for BLUS, but they 
 shouldn't be hard to compute. This is a standard topic 
 covered in many 
 econometrics texts.
 
 You might consider the alternative of generating a bootstrapped 
 confidence envelope for the QQ plot; the qq.plot() function 
 in the car 
 package will do this for a linear model.
 
 I hope this helps,
  John
 
 
 John Fox
 Department of Sociology
 McMaster University
 Hamilton, Ontario
 Canada L8S 4M4
 905-525-9140x23604
 http://socserv.mcmaster.ca/jfox
 
 
   
 
 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Federico 
 Gherardini
 Sent: Friday, October 15, 2004 7:44 AM
 To: [EMAIL PROTECTED]
 Subject: [R] Testing for normality of residuals in a 
 regression model
 
 Hi all,
 
 Is it possible to have a test value for assessing the normality of 
 residuals from a linear regression model, instead of simply 
 relying on 
 qqplots?
 I've tried to use fitdistr to try and fit the residuals 
 with a normal 
 distribution, but fitdsitr only returns the parameters of the 
 distribution and the standard errors, not the p-value. Am I missing 
 something?
 
 Cheers,
 
 Federico
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 
 
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 
 
   
 
 
 
 -- 
 
 Kjetil Halvorsen.
 
 Peace is the most effective weapon of mass construction.
--  Mahdi Elmandjra
 
 


__
[EMAIL PROTECTED] 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] Testing for normality of residuals in a regression model

2004-10-15 Thread John Fox
Dear Federico,

The problem is the same with GLS residuals -- even if the GLS transformation
produces homoskedastic errors, the residuals will be correlated and
heteroskedastic (with this problem tending to disappear in most instances as
n grows). The central point is that residuals don't behave quite the same as
errors.

Regards,
 John


John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox 
 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Federico Gherardini
 Sent: Friday, October 15, 2004 11:22 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [R] Testing for normality of residuals in a 
 regression model
 
 Thank you very much for your suggestions! The residuals come 
 from a gls model, because I had to correct for 
 heteroscedasticity using a weighted regression... can I 
 simply apply one of these tests (like shapiro.test) to the 
 standardized residuals from my gls model?
 
 Cheers,
 Federico
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html


__
[EMAIL PROTECTED] 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] Testing for normality of residuals in a regression model

2004-10-15 Thread John Fox
Dear Andy,

At the risk of muddying the waters (and certainly without wanting to
advocate the use of normality tests for residuals), I believe that your
point #4 is subject to misinterpretation: That is, while it is true that t-
and F-tests for regression coefficients in large sample retain their
validity well when the errors are non-normal, the efficiency of the LS
estimates can (depending upon the nature of the non-normality) be seriously
compromised, not only absolutely but in relation to alternatives (e.g.,
robust regression).

Regards,
 John


John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox 
 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Liaw, Andy
 Sent: Friday, October 15, 2004 11:55 AM
 To: 'Federico Gherardini'; Berton Gunter
 Cc: R-help mailing list
 Subject: RE: [R] Testing for normality of residuals in a 
 regression model
 
 Let's see if I can get my stat 101 straight:
 
 We learned that linear regression has a set of assumptions:
 
 1. Linearity of the relationship between X and y.
 2. Independence of errors.
 3. Homoscedasticity (equal error variance).
 4. Normality of errors.
 
 Now, we should ask:  Why are they needed?  Can we get away 
 with less?  What if some of them are not met?
 
 It should be clear why we need #1.
 
 Without #2, I believe the least squares estimator is still 
 unbias, but the usual estimate of SEs for the coefficients 
 are wrong, so the t-tests are wrong.
 
 Without #3, the coefficients are, again, still unbiased, but 
 not as efficient as can be.  Interval estimates for the 
 prediction will surely be wrong.
 
 Without #4, well, it depends.  If the residual DF is 
 sufficiently large, the t-tests are still valid because of 
 CLT.  You do need normality if you have small residual DF.
 
 The problem with normality tests, I believe, is that they 
 usually have fairly low power at small sample sizes, so that 
 doesn't quite help.  There's no free lunch:  A normality test 
 with good power will usually have good power against a fairly 
 narrow class of alternatives, and almost no power against 
 others (directional test).  How do you decide what to use?
 
 Has anyone seen a data set where the normality test on the 
 residuals is crucial in coming up with appriate analysis?
 
 Cheers,
 Andy
 
  From: Federico Gherardini
  
  Berton Gunter wrote:
  
  Exactly! My point is that normality tests are useless for
  this purpose for
  reasons that are beyond what I can take up here. 
  
  Thanks for your suggestions, I undesrtand that! Could you possibly 
  give me some (not too complicated!) links so that I can investigate 
  this matter further?
  
  Cheers,
  
  Federico
  
  Hints: Balanced designs are
  robust to non-normality; independence (especially
  clustering of subjects
  due to systematic effects), not normality is usually the
  biggest real
  statistical problem; hypothesis tests will always reject
  when samples are
  large -- so what!; trust refers to prediction validity
  which has to do
  with study design and the validity/representativeness of
  the current data to
  future. 
  
  I know that all the stats 101 tests say to test for
  normality, but they're
  full of baloney!
  
  Of course, this is free advice -- so caveat emptor!
  
  Cheers,
  Bert
  

  
  
  __
  [EMAIL PROTECTED] mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide! 
  http://www.R-project.org/posting-guide.html
  
 
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html

__
[EMAIL PROTECTED] 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] fidelity of generated raster images (R and perl)

2004-10-15 Thread Scott Harrison
Wrap-up:
Different solutions were proposed for turning a matrix
into a bitmap.
Henrik Bengtsson [EMAIL PROTECTED]
R.classes bundle from
 (http://www.maths.lth.se/help/R/R.classes/)
MonochromeImage
R.classes is still not compatible with
2.0.0 (minor modification to DESCRIPTION etc
 are needed) so you have use R v1.9.1 to try the below.
img - MonochromeImage(1-bits) # 1=white, 0=black
image(img)
plot(img)
persp(img, phi=60, theta=150)
write(img, foo.pbm) # Write directly
Martin Maechler [EMAIL PROTECTED]
I think the most typical alternative is to use image()
[EMAIL PROTECTED]
Maybe use the write.pnm() function in the pixmap package
Another package you could explore is rimage, which looks relevant.
For the sake of being conventional and minimizing dependencies,
I had good success with the image() function.  It is very nice to know
there are other approaches if I need to optimize/customize what
I am doing more for this.
(As usual) learned a few more things about 'R' from the examples
provided by others.  Most grateful for your help.
Regards,
Scott
__
[EMAIL PROTECTED] 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] Testing for normality of residuals in a regression model

2004-10-15 Thread Liaw, Andy
Hi John,

Your point is well taken.  I was only thinking about the shape of the
distribution, and neglected the cases of, say, symmetric long tailed
distributions.  However, I think I'd still argue that other tools are
probably more useful than normality tests (e.g., robust methods, as you
mentioned).

To take the point a bit further, let's say we test for normality and it's
rejected.  What do we do then?  Well, if the non-normality is caused by
outliers, we can try robust methods.  If not, what do we do?  We can try to
see if some sort of transformation would bring the residuals closer to
normally distributed, but if the interest is in inference on the
coefficients, those inferences on the `final' model are potentially invalid.
What's one to do then?

Also, I was told by someone very smart that fitting OLS to data with
heteroscedastic errors can make the residuals look `more normal' than they
really are...  Don't know how true that is, though.

Best,
Andy

 From: John Fox
 
 Dear Andy,
 
 At the risk of muddying the waters (and certainly without wanting to
 advocate the use of normality tests for residuals), I believe 
 that your
 point #4 is subject to misinterpretation: That is, while it 
 is true that t-
 and F-tests for regression coefficients in large sample retain their
 validity well when the errors are non-normal, the efficiency of the LS
 estimates can (depending upon the nature of the 
 non-normality) be seriously
 compromised, not only absolutely but in relation to 
 alternatives (e.g.,
 robust regression).
 
 Regards,
  John
 
 
 John Fox
 Department of Sociology
 McMaster University
 Hamilton, Ontario
 Canada L8S 4M4
 905-525-9140x23604
 http://socserv.mcmaster.ca/jfox 
  
 
  -Original Message-
  From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] On Behalf Of Liaw, Andy
  Sent: Friday, October 15, 2004 11:55 AM
  To: 'Federico Gherardini'; Berton Gunter
  Cc: R-help mailing list
  Subject: RE: [R] Testing for normality of residuals in a 
  regression model
  
  Let's see if I can get my stat 101 straight:
  
  We learned that linear regression has a set of assumptions:
  
  1. Linearity of the relationship between X and y.
  2. Independence of errors.
  3. Homoscedasticity (equal error variance).
  4. Normality of errors.
  
  Now, we should ask:  Why are they needed?  Can we get away 
  with less?  What if some of them are not met?
  
  It should be clear why we need #1.
  
  Without #2, I believe the least squares estimator is still 
  unbias, but the usual estimate of SEs for the coefficients 
  are wrong, so the t-tests are wrong.
  
  Without #3, the coefficients are, again, still unbiased, but 
  not as efficient as can be.  Interval estimates for the 
  prediction will surely be wrong.
  
  Without #4, well, it depends.  If the residual DF is 
  sufficiently large, the t-tests are still valid because of 
  CLT.  You do need normality if you have small residual DF.
  
  The problem with normality tests, I believe, is that they 
  usually have fairly low power at small sample sizes, so that 
  doesn't quite help.  There's no free lunch:  A normality test 
  with good power will usually have good power against a fairly 
  narrow class of alternatives, and almost no power against 
  others (directional test).  How do you decide what to use?
  
  Has anyone seen a data set where the normality test on the 
  residuals is crucial in coming up with appriate analysis?
  
  Cheers,
  Andy
  
   From: Federico Gherardini
   
   Berton Gunter wrote:
   
   Exactly! My point is that normality tests are useless for
   this purpose for
   reasons that are beyond what I can take up here. 
   
   Thanks for your suggestions, I undesrtand that! Could you 
 possibly 
   give me some (not too complicated!) links so that I can 
 investigate 
   this matter further?
   
   Cheers,
   
   Federico
   
   Hints: Balanced designs are
   robust to non-normality; independence (especially
   clustering of subjects
   due to systematic effects), not normality is usually the
   biggest real
   statistical problem; hypothesis tests will always reject
   when samples are
   large -- so what!; trust refers to prediction validity
   which has to do
   with study design and the validity/representativeness of
   the current data to
   future. 
   
   I know that all the stats 101 tests say to test for
   normality, but they're
   full of baloney!
   
   Of course, this is free advice -- so caveat emptor!
   
   Cheers,
   Bert
   
 
   
   
   __
   [EMAIL PROTECTED] mailing list
   https://stat.ethz.ch/mailman/listinfo/r-help
   PLEASE do read the posting guide! 
   http://www.R-project.org/posting-guide.html
   
  
  
  __
  [EMAIL PROTECTED] mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide! 
  

Re: [R] Testing for normality of residuals in a regression model

2004-10-15 Thread Spencer Graves
 OK, I'll expose myself: 

 I tend to do normal probability plots of residuals (usely deletion 
/ studentized residuals as described by Venables and Ripley in Modern 
Applied Statistics with S, 4th ed, MASS4).  If the plots look strange, I 
do something.  I'll check apparent outliers for coding and data entry 
errors, and I often delete those points from the analysis even if I 
can't find a reason why.  Robust regression will usually handle this 
type of problem, and I am gradually migrating to increasing use of 
robust regression, especially the procedures recommended by MASS4.  . 

 However, I recently encountered a situation that would be masked 
by standard use of robust regression without examining residual plots:  
A normal probability plot looked like three parallel straight lines with 
gaps, suggesting a mixture of 3 normal distributions with different 
means and a common standard deviation.  Further investigation revealed 
that an important 3-level explanatory variable that had been miscoded.  
When this was corrected, that variable entered the model and the gaps in 
the normal plot disappeared. 

 I tend NOT to use tests of normality for the reasons Andy 
mentioned.  Instead, I do various kinds of diagnostic plots and modify 
my model or investigate the data in response to what I see. 

 Comments?
 hope this helps.  spencer graves
Liaw, Andy wrote:
Let's see if I can get my stat 101 straight:
We learned that linear regression has a set of assumptions:
1. Linearity of the relationship between X and y.
2. Independence of errors.
3. Homoscedasticity (equal error variance).
4. Normality of errors.
Now, we should ask:  Why are they needed?  Can we get away with less?  What
if some of them are not met?
It should be clear why we need #1.
Without #2, I believe the least squares estimator is still unbias, but the
usual estimate of SEs for the coefficients are wrong, so the t-tests are
wrong.
Without #3, the coefficients are, again, still unbiased, but not as
efficient as can be.  Interval estimates for the prediction will surely be
wrong.
Without #4, well, it depends.  If the residual DF is sufficiently large, the
t-tests are still valid because of CLT.  You do need normality if you have
small residual DF.
The problem with normality tests, I believe, is that they usually have
fairly low power at small sample sizes, so that doesn't quite help.  There's
no free lunch:  A normality test with good power will usually have good
power against a fairly narrow class of alternatives, and almost no power
against others (directional test).  How do you decide what to use?
Has anyone seen a data set where the normality test on the residuals is
crucial in coming up with appriate analysis?
Cheers,
Andy
 

From: Federico Gherardini
Berton Gunter wrote:
   

Exactly! My point is that normality tests are useless for 
 

this purpose for
   

reasons that are beyond what I can take up here. 

 

Thanks for your suggestions, I undesrtand that! Could you 
possibly give 
me some (not too complicated!)
links so that I can investigate this matter further?

Cheers,
Federico
   

Hints: Balanced designs are
robust to non-normality; independence (especially 
 

clustering of subjects
   

due to systematic effects), not normality is usually the 
 

biggest real
   

statistical problem; hypothesis tests will always reject 
 

when samples are
   

large -- so what!; trust refers to prediction validity 
 

which has to do
   

with study design and the validity/representativeness of 
 

the current data to
   

future. 

I know that all the stats 101 tests say to test for 
 

normality, but they're
   

full of baloney!
Of course, this is free advice -- so caveat emptor!
Cheers,
Bert


 

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html

   

__
[EMAIL PROTECTED] 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
O:  (408)938-4420;  mobile:  (408)655-4567
__
[EMAIL PROTECTED] 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] categorical varibles in coxph

2004-10-15 Thread Lisa Wang
Hello,

I wonder when I do coxph in R:

coxph( Surv(start, stop, event) ~ x, data=test)

If x is a categorical varible (1,2,3,4,5), should I creat four dummy
varibles for it? if yes, how can I get the overall p value on x other
than for each dummy variable?

Thanks

Lisa Wang

Princess Margaret Hospital
Phone 416 946 4501

__
[EMAIL PROTECTED] 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] Using accrualReport.s in Hmisc/Design

2004-10-15 Thread Aric Gregson
Hello,

I apologize for the post if this is not the appropriate place. I have
searched the R List archives and the Vanderbilt.edu website, but am not
able to understand how to use the accrualReport.s and associated scripts
available at the Vanderbilt site. It must be very simple, but I am at a
loss for ideas. Any suggestions or pointers in the direction of
examples?

thanks very much.

aric

__
[EMAIL PROTECTED] 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] Using accrualReport.s in Hmisc/Design

2004-10-15 Thread Frank E Harrell Jr
Aric Gregson wrote:
Hello,
I apologize for the post if this is not the appropriate place. I have
searched the R List archives and the Vanderbilt.edu website, but am not
able to understand how to use the accrualReport.s and associated scripts
available at the Vanderbilt site. It must be very simple, but I am at a
loss for ideas. Any suggestions or pointers in the direction of
examples?
thanks very much.
aric
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
That is part of a new package for clinical trials reporting that is not 
packaged for use by 'outsiders' yet.  The R package name will be rreport.

--
Frank E Harrell Jr   Professor and Chair   School of Medicine
 Department of Biostatistics   Vanderbilt University
__
[EMAIL PROTECTED] 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] categorical varibles in coxph

2004-10-15 Thread Thomas Lumley
On Fri, 15 Oct 2004, Lisa Wang wrote:
Hello,
I wonder when I do coxph in R:
coxph( Surv(start, stop, event) ~ x, data=test)
If x is a categorical varible (1,2,3,4,5), should I creat four dummy
varibles for it? if yes, how can I get the overall p value on x other
than for each dummy variable?
No. Use
  coxph( Surv(start, stop, event) ~ factor(x), data=test)
or define x as a factor.
For an overal test use anova(): eg
data(pbc)
model-coxph(Surv(time,status)~factor(edtrt)+bili, data=pbc)
model
Call:
coxph(formula = Surv(time, status) ~ factor(edtrt) + bili, data = pbc)
  coef exp(coef) se(coef)z   p
factor(edtrt)0.5 0.629  1.88   0.2297 2.74 6.2e-03
factor(edtrt)1   1.664  5.28   0.2762 6.02 1.7e-09
bili 0.119  1.13   0.0129 9.29 0.0e+00
Likelihood ratio test=127  on 3 df, p=0  n= 418
anova(model)
Analysis of Deviance Table
 Cox model: response is Surv(time, status)
Terms added sequentially (first to last)
   Df Deviance Resid. Df Resid. Dev
NULL 4181746.94
factor(edtrt)   262.13   4161684.82
bili165.11   4151619.71
summary(model)
Call:
coxph(formula = Surv(time, status) ~ factor(edtrt) + bili, data = pbc)
  n= 418
  coef exp(coef) se(coef)z   p
factor(edtrt)0.5 0.629  1.88   0.2297 2.74 6.2e-03
factor(edtrt)1   1.664  5.28   0.2762 6.02 1.7e-09
bili 0.119  1.13   0.0129 9.29 0.0e+00
 exp(coef) exp(-coef) lower .95 upper .95
factor(edtrt)0.5  1.88  0.533  1.20  2.94
factor(edtrt)15.28  0.189  3.07  9.07
bili  1.13  0.887  1.10  1.16
Rsquare= 0.262   (max possible= 0.985 )
Likelihood ratio test= 127  on 3 df,   p=0
Wald test= 193  on 3 df,   p=0
Score (logrank) test = 281  on 3 df,   p=0
__
[EMAIL PROTECTED] 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] tree version 1.0-16

2004-10-15 Thread James W. MacDonald
Kalaylioglu, Zeynep (IMS) wrote:
Hi
There is something weird going on with the tree package version
1.0-16.
So I want to download an updated tree package. I found that R website
has version 1.0-18. I want to try this one and see how the tree
algorithm is performing.
What is the best way to download tree package version 1.0-18 which can
be found in index of src/contrib at www.r-project.org?
So far I tried two different ways none of which has worked for me:
1) I tried to download it by running the command 
install.packages(tree,C:\Program
Files\R\rw1081\library,http://cran.r-project.org/src/contrib,destdir=
C:\Program http://cran.r-project.org/src/contrib,destdir=C:/Program
Files\R\rw1081\library,installWithVers=TRUE)
But it tries to connect to
http://cran.r-project.org/src/contrib/bin/windows/contrib/1.8/PACKAGES
http://cran.r-project.org/src/contrib/bin/windows/contrib/1.8/PACKAGES
instead of the URL I enter above.
How about Packages -- Install package(s) from CRAN...? You are making 
things unnecessarily difficult.

 
2) Also I tried to download it by copying the zip file first
 tree_1.0-18.tar.gz
Zip files don't end with .tar.gz! These are tarred and gzipped source 
packages that you are almost certainly not set up to install. Your best 
bet is to try the simplest things first, which on Windows is to use the 
Packages menu.

Best,
Jim

http://cran.r-project.org/src/contrib/tree_1.0-18.tar.gz   in my
directory and then using the Packages-Install package from local -zip
files in the R menu. 
 
How can I download this version of tree? Thanks.
 
Zeynep

[[alternative HTML version deleted]]
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

--
James W. MacDonald
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
__
[EMAIL PROTECTED] 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] combine many .csv files into a single file/data frame

2004-10-15 Thread Ted Harding
On 15-Oct-04 bogdan romocea wrote:
 Dear R users,
 
 I have a few hundred .csv files which I need to put
 together (full outer joins on a common variable) to do a
 factor analysis. Each file may contain anywhere from a few
 hundred to a few thousand rows. What would be the most
 efficient way to do this in R? Please include some sample
 code if applicable.

If you're using Linux/Unix, you should consider using the 'join'
command. Simple example (jpoining files j1 and j2):

$ cat j1
1 a
1 b
2 c
2 d
2 e
3 f
3 g
4 h

$ cat j2
1 A
1 B
2 C
3 D
3 E
3 F

$ join j1 j2
1 a A
1 a B
1 b A
1 b B
2 c C
2 d C
2 e C
3 f D
3 f E
3 f F
3 g D
3 g E
3 g F

See 'man join' for details of options which you can use to
adapt the command to your needs.

Hoping this helps,
Ted.



E-Mail: (Ted Harding) [EMAIL PROTECTED]
Fax-to-email: +44 (0)870 094 0861  [NB: New number!]
Date: 15-Oct-04   Time: 21:41:44
-- XFMail --

__
[EMAIL PROTECTED] 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] power in a specific frequency band

2004-10-15 Thread Giuseppe Pagnoni
Dear R users
I have a really simple question (hoping for a really simple answer :-):
Having estimated the spectral density of a time series x (heart rate 
data) with:

x.pgram - spectrum(x,method=pgram)
 I would like to compute the power in a specific energy band.
Assuming that frequency(x)=4 (Hz), and that I am interested in the band 
between f1 and f2, is the power in the band simply the following?

sum(x.pgram$spec[(x.pgram$freq  f1/frequency(x))  (x.pgram$freq = 
f2/frequency(x))])

If it is so, are the returned units the same units as the original time 
series, but squared (if x is bpm, then the power is in bpm^2)?

I own a copy of Venables and Ripley (MASS 2003), but I was not able to 
extract this information from the time series chapter

thanks for any help
(please cc to my e-mail, if possible)
giuseppe


Giuseppe Pagnoni
Dept. Psychiatry and Behavioral Sciences
Emory University
1639 Pierce Drive, Suite 4000
Atlanta, GA, 30322
tel: 404.712.8431
fax: 404.727.3233
__
[EMAIL PROTECTED] 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] Testing for normality of residuals in a regression model

2004-10-15 Thread Kjetil Brinchmann Halvorsen
Liaw, Andy wrote:
.
.
.
.
Also, I was told by someone very smart that fitting OLS to data with
heteroscedastic errors can make the residuals look `more normal' than they
really are...  Don't know how true that is, though.  
 

Certainly true, since the residuals will be a kind of average, so the 
CLT works.
(Think that is in Seber, Linear Regression Analysis, 1977)

Kjetil
Best,
Andy
 

--
Kjetil Halvorsen.
Peace is the most effective weapon of mass construction.
  --  Mahdi Elmandjra
__
[EMAIL PROTECTED] 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 Compiling R-2.0.0 on Linux Alpha

2004-10-15 Thread Prasad, Rajiv
Hi folks:

I'm trying to compile R-2.0.0 on my Alpha (164SX;
alphapca56-unknown-linux-gnu) running RedHat Linux 7.2 with gcc3.4.1.
Here is where the compile terminates:



building package 'tcltk'
mkdir -p -- ../../../library/tcltk/R
mkdir -p -- ../../../library/tcltk/demo
mkdir -p -- ../../../library/tcltk/exec
mkdir -p -- ../../../library/tcltk/man
make[4]: Entering directory
`/home1/rajiv/software/src-7.2/R-2.0.0/src/library/t
cltk/src'
making init.d from init.c
making tcltk.d from tcltk.c
make[5]: Entering directory
`/home1/rajiv/software/src-7.2/R-2.0.0/src/library/t
cltk/src'
make[5]: `Makedeps' is up to date.
make[5]: Leaving directory
`/home1/rajiv/software/src-7.2/R-2.0.0/src/library/tc
ltk/src'
make[5]: Entering directory
`/home1/rajiv/software/src-7.2/R-2.0.0/src/library/t
cltk/src'
gcc -I../../../../include -I/usr/local/tcl8.4.7/include
-I/usr/local/tk8.4.7/inc
lude -I/usr/X11R6/include -I/usr/local/include -mieee-with-inexact
-fPIC  -g -O
2 -c init.c -o init.o
gcc -I../../../../include -I/usr/local/tcl8.4.7/include
-I/usr/local/tk8.4.7/inc
lude -I/usr/X11R6/include -I/usr/local/include -mieee-with-inexact
-fPIC  -g -O
2 -c tcltk.c -o tcltk.o
gcc -shared -L/usr/local/lib -o tcltk.so init.o tcltk.o
-L/usr/local/tcl8.4.7/l
ib -ltcl8.4 -L/usr/local/tk8.4.7/lib -ltk8.4 -L/usr/X11R6/lib -lX11 -ldl
-lieee
 -lm -lm  -L../../../../lib -lR
mkdir -p -- ../../../../library/tcltk/libs
make[5]: Leaving directory
`/home1/rajiv/software/src-7.2/R-2.0.0/src/library/tc
ltk/src'
make[4]: Leaving directory
`/home1/rajiv/software/src-7.2/R-2.0.0/src/library/tc
ltk/src'
make[3]: Leaving directory
`/home1/rajiv/software/src-7.2/R-2.0.0/src/library/tc
ltk'
Error in names-.default(`*tmp*`, value = c(R, Platform, Date,
:
names attribute [4] must be the same length as the vector [3]
Execution halted
make[2]: *** [R] Error 1
make[2]: Leaving directory
`/home1/rajiv/software/src-7.2/R-2.0.0/src/library'
make[1]: *** [R] Error 1
make[1]: Leaving directory `/home1/rajiv/software/src-7.2/R-2.0.0/src'
make: *** [R] Error 1

Does this indicate a problem with R, or something in my system
installation?  A search on R help list archives did not turn up this
particular error.

Any help is much appreciate.

Rajiv

Rajiv Prasad
Scientist, Hydrology Group
Pacific Northwest National Laboratory, P.O. Box 999, MSIN K9-33
Richland, WA 99352
Voice: (509) 375-2096  Fax: (509) 372-6089  Email: [EMAIL PROTECTED]


[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] 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] 20,000 * 6 data values

2004-10-15 Thread Sun
Hello, Rusers:

What is the maximum number of data R can handle? Or I have to use SAS? I am
trying to do some microarray data analysis. But I am totally new. Did anyone
use R to do microarray analysis?

Many thanks,

Sun

__
[EMAIL PROTECTED] 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] sapply and loop

2004-10-15 Thread Zhen Pang
Dear all,
I am doing 200 times simulation. For each time, I generate a matrix and 
define some function on this matrix to get a 6 dimension vector as my 
results.

As the loop should be slow, I generate 200 matrice first, and save them into 
a list named ma,
then I define zz-sapply(ma, myfunction)

To my surprise, It almost costs me the same time to get my results if I 
directly use a loop from 1 to 200. Is it common? Can I improve any further?

Ps, how to count the exact time to finish my code?
Thanks.
Zhen
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html