Re: [R] problems saving and loading (PLMset) objects

2007-07-31 Thread Quin Wills
Erm, Jim I am loading in the affyPLM package first (when needed) and this
was a question based on loading/saving R objects. PLMset was an example.

Many thanks,
Quin


-Original Message-
From: James W. MacDonald [mailto:[EMAIL PROTECTED] 
Sent: 31 July 2007 14:54
To: Quin Wills
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] problems saving and loading (PLMset) objects

Hi Quin,

First off, you should ask questions about Bioconductor packages on the 
BioC listserv rather than R-help.

Anyway, I don't think your PLMset objects are coming out all wrong - it 
doesn't appear that you are loading the affyPLM package first, which is 
required for R to know anything about the PLMset object (this object is 
defined in affyPLM, so without the package R has no idea what it is).

Best,

Jim



Quin Wills wrote:
 Hi
 
  
 
 I'm running the latest R on a presumably up to date Linux server.
 
  
 
 'Doing something silly I'm sure, but can't see why my saved PLMset objects
 come out all wrong. To use an example:
 
  
 
 Setting up an example PLMset (I have the same problem no matter what
example
 I use)
 
 library(affyPLM)
 
 data(Dilution) # affybatch object
 
 Dilution = updateObject(Dilution)
 
 options(width=36)
 
 expr - fitPLM(Dilution)
 
  
 
  
 
 This works, and I'm able to get the probeset coefficients with
coefs(expr).
 until I save and try reloading:
 
 save(expr, file=expr.RData)
 
 rm(expr) # just to be sure
 
 expr - load(expr.RData)
 
  
 
  
 
 Now, running coefs(expr) says:
 
 Error in function (classes, fdef, mtable) : unable to find an inherited
 method for function coefs, for signature character
 
  
 
  
 
 Trying str(exp) just gives the following:
 
 chr exp
 
  
 
 expr.Rdata appears to save properly (in that there is an actual file with
 notable size in my working directory).
 
  
 
 Thanks in advance,
 
 Quin
 
  
 
  
 
 
   [[alternative HTML version deleted]]
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

-- 
James W. MacDonald, M.S.
Biostatistician
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] problems saving and loading (PLMset) objects

2007-07-30 Thread Quin Wills
Hi

 

I'm running the latest R on a presumably up to date Linux server.

 

'Doing something silly I'm sure, but can't see why my saved PLMset objects
come out all wrong. To use an example:

 

Setting up an example PLMset (I have the same problem no matter what example
I use)

 library(affyPLM)

 data(Dilution) # affybatch object

 Dilution = updateObject(Dilution)

 options(width=36)

 expr - fitPLM(Dilution)

 

 

This works, and I'm able to get the probeset coefficients with coefs(expr).
until I save and try reloading:

 save(expr, file=expr.RData)

 rm(expr) # just to be sure

 expr - load(expr.RData)

 

 

Now, running coefs(expr) says:

 Error in function (classes, fdef, mtable) : unable to find an inherited
method for function coefs, for signature character

 

 

Trying str(exp) just gives the following:

 chr exp

 

expr.Rdata appears to save properly (in that there is an actual file with
notable size in my working directory).

 

Thanks in advance,

Quin

 

 


[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] problems saving and loading (PLMset) objects

2007-07-30 Thread Quin Wills
Ah, didn't realize that I couldn't re-assign in one step... I was trying to
load in various data (on separate occasions), using a common object name to
run through some template code.

Many thanks!
 

-Original Message-
From: jim holtman [mailto:[EMAIL PROTECTED] 
Sent: 30 July 2007 23:51
To: Quin Wills
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] problems saving and loading (PLMset) objects

you just need to say:

load(expr.RData)

You should not be assigning it to 'expr' since it is already 'load'ed

On 7/30/07, Quin Wills [EMAIL PROTECTED] wrote:
 Hi



 I'm running the latest R on a presumably up to date Linux server.



 'Doing something silly I'm sure, but can't see why my saved PLMset objects
 come out all wrong. To use an example:



 Setting up an example PLMset (I have the same problem no matter what
example
 I use)

  library(affyPLM)

  data(Dilution) # affybatch object

  Dilution = updateObject(Dilution)

  options(width=36)

  expr - fitPLM(Dilution)





 This works, and I'm able to get the probeset coefficients with
coefs(expr).
 until I save and try reloading:

  save(expr, file=expr.RData)

  rm(expr) # just to be sure

  expr - load(expr.RData)





 Now, running coefs(expr) says:

  Error in function (classes, fdef, mtable) : unable to find an inherited
 method for function coefs, for signature character





 Trying str(exp) just gives the following:

  chr exp



 expr.Rdata appears to save properly (in that there is an actual file with
 notable size in my working directory).



 Thanks in advance,

 Quin






[[alternative HTML version deleted]]

 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem you are trying to solve?

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] multiple rugs on a single plot

2007-07-17 Thread Quin Wills
Hi

 

I could only find some discussion on this wrt lattice graphics (which I'm
not using). Apologies if I'm missing something obvious. 

 

I'd like to produce 3 rug plots under a kernel density plot for a
population. The population is subdivided into 3 subpopulations, which I'd
like the rug plots to highlight. Naturally, when I do 3 rug plots, they all
plot over each other. I'd like 3 parallel rug plots along the x-axis. But
how.

 

Thanks in advance,

Quin

 

 

 


[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] multiple rugs on a single plot

2007-07-17 Thread Quin Wills
Excellent! Thanks.

-Original Message-
From: Dimitris Rizopoulos [mailto:[EMAIL PROTECTED] 
Sent: 17 July 2007 13:40
To: Quin Wills
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] multiple rugs on a single plot

you could use different colours, e.g.,

x1 - rnorm(100, -2.5, 1)
x2 - rnorm(100, 0, 1)
x3 - rnorm(100, 2.5, 1)
x - c(x1, x2, x3)

plot(density(x))
rug(x1, col = red)
rug(x2, col = black)
rug(x3, col = blue)

or something like the following:

plot(density(x))
len - 0.005
ds - 0.001
segments(x1, -1, x1, 0)
segments(x2, 0 + ds, x2, len)
segments(x3, len + ds, x3, 2*len)


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/(0)16/336899
Fax: +32/(0)16/337015
Web: http://med.kuleuven.be/biostat/
 http://www.student.kuleuven.be/~m0390867/dimitris.htm


- Original Message - 
From: Quin Wills [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Sent: Tuesday, July 17, 2007 12:50 PM
Subject: [R] multiple rugs on a single plot


 Hi



 I could only find some discussion on this wrt lattice graphics 
 (which I'm
 not using). Apologies if I'm missing something obvious.



 I'd like to produce 3 rug plots under a kernel density plot for a
 population. The population is subdivided into 3 subpopulations, 
 which I'd
 like the rug plots to highlight. Naturally, when I do 3 rug plots, 
 they all
 plot over each other. I'd like 3 parallel rug plots along the 
 x-axis. But
 how.



 Thanks in advance,

 Quin








 [[alternative HTML version deleted]]

 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide 
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] PCA with not non-negative definite covariance

2006-07-27 Thread Quin Wills
Thank you... I will definitely check that up.

Quin

-Original Message-
From: Stéphane Dray [mailto:[EMAIL PROTECTED] 
Sent: 27 July 2006 09:04 AM
To: Quin Wills
Cc: 'Berton Gunter'; r-help@stat.math.ethz.ch
Subject: Re: [R] PCA with not non-negative definite covariance

As said by Pierre Bady,
an answer to your question is NIPALS analysis.
PCA is usually obtained by the diagonalization of a variance-covariance 
matrix. But it can also be obtained by an iterative proedure which 
consists in two regressions. NIPLAS is an implementation of this 
iterative procedure and is strictly equivalent to PCA when there is no 
missing values.
The adavantage of NIPALS is that it can be used with missing values. 
However, note that the convergence is not always obtained (it depends of 
the number and distribution of missing values).
You can find a description of the method and the algorithm here:

http://biomserv.univ-lyon1.fr/~dray/articles/SD165.html

Sincerely,


Quin Wills wrote:

My apologies (in response to the last 2 replies). I should write sensibly -
including subject titles that make grammatical sense.

(1) By analogous, I mean that using classical MDS with Euclidian distance
is
equivalent to plotting the first k principle components.
(2) Agreed re. distribution assumptions.
(3) Agreed re. the need to use some kind of imputation for calculating
distances. I'm thinking pairwise exclusion for correlation.

Re. why I want to do this is simply for graphically representing my data.

Quin



-Original Message-
From: Berton Gunter [mailto:[EMAIL PROTECTED] 
Sent: 26 July 2006 05:10 PM
To: 'Quin Wills'; [EMAIL PROTECTED]
Cc: r-help@stat.math.ethz.ch
Subject: RE: [R] PCA with not non-negative definite covariance

Not sure what completely analagous means; mds is nonlinear, PCA is
linear.

In any case, the bottom line is that if you have high dimensional data with
many missing values, you cannot know what the multivariate distribution
looks like -- and you need a **lot** of data with many variables to
usefully
characterize it anyway. So you must either make some assumptions about what
the distribution could be (including imputation methodology) or use any of
the many exploratory techniques available to learn what you can.
Thermodynamics holds -- you can't get something for nothing (you can't fool
Mother Nature).

-- Bert Gunter
Genentech Non-Clinical Statistics
South San Francisco, CA
 
The business of the statistician is to catalyze the scientific learning
process.  - George E. P. Box
 
 

  

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Quin Wills
Sent: Wednesday, July 26, 2006 8:44 AM
To: [EMAIL PROTECTED]
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] PCA with not non-negative definite covariance

Thanks.

I suppose that another option could be just to use classical
multi-dimensional scaling. By my understanding this is (if based on
Euclidian measure) completely analogous to PCA, and because it's based
explicitly on distances, I could easily exclude the variables 
with NA's on a
pairwise basis when calculating the distances.

Quin

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 25 July 2006 09:24 AM
To: Quin Wills
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] PCA with not non-negative definite covariance

Hi , hi all,



Am I correct to understand from the previous discussions on 
  

this topic (a


few years back) that if I have a matrix with missing values 
  

my PCA options


seem dismal if:
(1) I don’t want to impute the missing values.
(2) I don’t want to completely remove cases with missing values.
(3) I do cov() with use=”pairwise.complete.obs”, as 
  

this produces


negative eigenvalues (which it has in my case!).
  

(4) Maybe you can use the Non-linear Iterative Partial Least Squares
(NIPALS)
algorithm (intensively used in chemometry). S. Dray proposes 
a version of
this
procedure at http://pbil.univ-lyon1.fr/R/additifs.html.


Hope this help :)


Pierre



--

Ce message a été envoyé depuis le webmail IMP (Internet 
Messaging Program)

-- 
No virus found in this incoming message.


 

--

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide 
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.




  



-- 
Stéphane DRAY ([EMAIL PROTECTED] )
Laboratoire BBE-CNRS-UMR-5558, Univ. C. Bernard - Lyon I
43, Bd du 11 Novembre 1918, 69622 Villeurbanne Cedex, France
Tel: 33 4 72 43 27 57   Fax: 33 4 72 43 13 88
http://biomserv.univ-lyon1.fr/~dray/

-- 
No virus found in this incoming message.


 

--

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] PCA with not non-negative definite covariance

2006-07-26 Thread Quin Wills
Thanks.

I suppose that another option could be just to use classical
multi-dimensional scaling. By my understanding this is (if based on
Euclidian measure) completely analogous to PCA, and because it's based
explicitly on distances, I could easily exclude the variables with NA's on a
pairwise basis when calculating the distances.

Quin

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 25 July 2006 09:24 AM
To: Quin Wills
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] PCA with not non-negative definite covariance

Hi , hi all,

 Am I correct to understand from the previous discussions on this topic (a
 few years back) that if I have a matrix with missing values my PCA options
 seem dismal if:
 (1) I don’t want to impute the missing values.
 (2) I don’t want to completely remove cases with missing values.
 (3) I do cov() with use=”pairwise.complete.obs”, as this produces
 negative eigenvalues (which it has in my case!).

(4) Maybe you can use the Non-linear Iterative Partial Least Squares
(NIPALS)
algorithm (intensively used in chemometry). S. Dray proposes a version of
this
procedure at http://pbil.univ-lyon1.fr/R/additifs.html.


Hope this help :)


Pierre



--
Ce message a été envoyé depuis le webmail IMP (Internet Messaging Program)

-- 
No virus found in this incoming message.


 

--

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] PCA with not non-negative definite covariance

2006-07-26 Thread Quin Wills
My apologies (in response to the last 2 replies). I should write sensibly -
including subject titles that make grammatical sense.

(1) By analogous, I mean that using classical MDS with Euclidian distance is
equivalent to plotting the first k principle components.
(2) Agreed re. distribution assumptions.
(3) Agreed re. the need to use some kind of imputation for calculating
distances. I'm thinking pairwise exclusion for correlation.

Re. why I want to do this is simply for graphically representing my data.

Quin



-Original Message-
From: Berton Gunter [mailto:[EMAIL PROTECTED] 
Sent: 26 July 2006 05:10 PM
To: 'Quin Wills'; [EMAIL PROTECTED]
Cc: r-help@stat.math.ethz.ch
Subject: RE: [R] PCA with not non-negative definite covariance

Not sure what completely analagous means; mds is nonlinear, PCA is linear.

In any case, the bottom line is that if you have high dimensional data with
many missing values, you cannot know what the multivariate distribution
looks like -- and you need a **lot** of data with many variables to usefully
characterize it anyway. So you must either make some assumptions about what
the distribution could be (including imputation methodology) or use any of
the many exploratory techniques available to learn what you can.
Thermodynamics holds -- you can't get something for nothing (you can't fool
Mother Nature).

-- Bert Gunter
Genentech Non-Clinical Statistics
South San Francisco, CA
 
The business of the statistician is to catalyze the scientific learning
process.  - George E. P. Box
 
 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Quin Wills
 Sent: Wednesday, July 26, 2006 8:44 AM
 To: [EMAIL PROTECTED]
 Cc: r-help@stat.math.ethz.ch
 Subject: Re: [R] PCA with not non-negative definite covariance
 
 Thanks.
 
 I suppose that another option could be just to use classical
 multi-dimensional scaling. By my understanding this is (if based on
 Euclidian measure) completely analogous to PCA, and because it's based
 explicitly on distances, I could easily exclude the variables 
 with NA's on a
 pairwise basis when calculating the distances.
 
 Quin
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: 25 July 2006 09:24 AM
 To: Quin Wills
 Cc: r-help@stat.math.ethz.ch
 Subject: Re: [R] PCA with not non-negative definite covariance
 
 Hi , hi all,
 
  Am I correct to understand from the previous discussions on 
 this topic (a
  few years back) that if I have a matrix with missing values 
 my PCA options
  seem dismal if:
  (1) I don’t want to impute the missing values.
  (2) I don’t want to completely remove cases with missing values.
  (3) I do cov() with use=”pairwise.complete.obs”, as 
 this produces
  negative eigenvalues (which it has in my case!).
 
 (4) Maybe you can use the Non-linear Iterative Partial Least Squares
 (NIPALS)
 algorithm (intensively used in chemometry). S. Dray proposes 
 a version of
 this
 procedure at http://pbil.univ-lyon1.fr/R/additifs.html.
 
 
 Hope this help :)
 
 
 Pierre
 
 
 
 --
 
 Ce message a été envoyé depuis le webmail IMP (Internet 
 Messaging Program)
 
 -- 
 No virus found in this incoming message.
 
 
  
 
 --
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide 
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.
 

-- 
No virus found in this incoming message.


 

--

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] PCA with not non-negative definite covariance

2006-07-24 Thread Quin Wills
Am I correct to understand from the previous discussions on this topic (a
few years back) that if I have a matrix with missing values my PCA options
seem dismal if:

 

(1) I don’t want to impute the missing values.

(2) I don’t want to completely remove cases with missing values.

(3) I do cov() with use=”pairwise.complete.obs”, as this produces
negative eigenvalues (which it has in my case!).

 

This seems like such a shame as I would like to use PCA to plot my
clustering results. Any wisdom?

 

Quin

 

 

 


-- 

Checked by AVG Free Edition.

 

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] How best to deal with returned errors?

2006-07-18 Thread Quin Wills
Hi,

 

What is the best general strategy to prevent returned errors from
interrupting whatever it is I am running? Only by using options()?

 

This is a problem for me in 2 particular cases:

(i)   An error breaking my loops.

(ii) I would like to run some regressions where it
automatically will try a specified number of increasingly robust options
until the regression doesn’t fail.

 

Using try(), especially for the second case, seems a bit clunky for my
needs. As I’ve never really automated the handling of my errors I was
wondering if there is perhaps a bit of simple wisdom or pointers in the
right direction on the matter.

 

Thanks,

Quin

 

 

 


-- 

Checked by AVG Free Edition.

 

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Weighting cluster variables in R?

2006-05-30 Thread Quin Wills
Are there functions to weight variables for clustering in R? I can't seem to
find anything, so apologies if there is.

 

I am particularly interested in weighting variables (starting with kmeans)
to optimise inter/intra-cluster distances. It seems to me that if certain
variables do show a strong cluster structure, this would be a wise thing to
do.

 

Any advice welcome.

 

Quin

 

 

 


[[alternative HTML version deleted]]

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


Re: [R] How to use a validation set rather than the default cross-validation in rpart() ?

2006-05-03 Thread Quin Wills
Many thanks. I'm using it for pruning and was hoping that rpart allows use
of a validation set rather than cross-validation for generating a CP/error
table.

-Original Message-
From: Uwe Ligges [mailto:[EMAIL PROTECTED] 
Sent: 03 May 2006 07:53
To: Quin Wills
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] How to use a validation set rather than the default
cross-validation in rpart() ?

Quin Wills wrote:

 I want use a validation set for my classification tree rather than the
 default 10-fold validation in rpart() but can't see which arguments to use
 to get this right. Advice appreciated thanks. I assume that this is
 possible!

You cannot for the internal algorithm that optimizes the splits of the 
tree. Of course you can do so for estimating the misclassification rate 
(or whatever), but this has nothing to do with rpart() itself

Uwe Ligges

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


Re: [R] How to use a validation set rather than the default cross-validation in rpart() ?

2006-05-03 Thread Quin Wills
Is it not true that cross-validation can sometimes over estimate
classification error - versus bringing in an external validation data set
and checking its classification error? I was trying to test this out, but
from what I see either way seems to be much of muchness.

-Original Message-
From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] 
Sent: 03 May 2006 10:33
To: Quin Wills
Cc: 'Uwe Ligges'; r-help@stat.math.ethz.ch
Subject: Re: [R] How to use a validation set rather than the default
cross-validation in rpart() ?

On Wed, 3 May 2006, Quin Wills wrote:

 Many thanks. I'm using it for pruning and was hoping that rpart allows use
 of a validation set rather than cross-validation for generating a CP/error
 table.

Since it is not documented how to, why do you expect to?  Indeed, why do 
you think it would be a good idea?


 -Original Message-
 From: Uwe Ligges [mailto:[EMAIL PROTECTED]
 Sent: 03 May 2006 07:53
 To: Quin Wills
 Cc: r-help@stat.math.ethz.ch
 Subject: Re: [R] How to use a validation set rather than the default
 cross-validation in rpart() ?

 Quin Wills wrote:

 I want use a validation set for my classification tree rather than the
 default 10-fold validation in rpart() but can't see which arguments to
use
 to get this right. Advice appreciated thanks. I assume that this is
 possible!

 You cannot for the internal algorithm that optimizes the splits of the
 tree. Of course you can do so for estimating the misclassification rate
 (or whatever), but this has nothing to do with rpart() itself

 Uwe Ligges

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


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

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


[R] How to use a validation set rather than the default cross-validation in rpart() ?

2006-05-02 Thread Quin Wills
I want use a validation set for my classification tree rather than the
default 10-fold validation in rpart() but can't see which arguments to use
to get this right. Advice appreciated thanks. I assume that this is
possible!

 

 

 


[[alternative HTML version deleted]]

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


[R] How to get around heteroscedasticity with non-linear least squares in R?

2006-02-21 Thread Quin Wills
I am using nls to fit dose-response curves but am not sure how to approach
more robust regression in R to get around the problem of the my error
showing increased variance with increasing dose.  

 

My understanding is that rlm or lqs would not be a good idea here.
'Fairly new to regression work, so apologies if I'm missing something
obvious.

 


[[alternative HTML version deleted]]

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


Re: [R] How to get around heteroscedasticity with non-linear leas t squares in R?

2006-02-21 Thread Quin Wills
Thank you all, this has been a great help (including the methodological
advice). Very interesting - I'll be sure to read the lecture.

Quin

-Original Message-
From: Liaw, Andy [mailto:[EMAIL PROTECTED] 
Sent: 22 February 2006 01:18
To: 'Brian S Cade'; [EMAIL PROTECTED]
Cc: Quin Wills; r-help@stat.math.ethz.ch; [EMAIL PROTECTED]
Subject: RE: [R] How to get around heteroscedasticity with non-linear leas t
squares in R?

From: Brian S Cade
 
 Instead of thinking that the heteroscedasticity is a nuisance and 
 something to get around, i.e, just wanting weighted 
 estimates of the 
 mean function, you might want to think about what 
 heteroscedasticity is 
 telling you and estimate some other quantities.  

Indeed!  See Prof. Carroll's 2002 Fisher Lecture:
http://www.stat.tamu.edu/ftp/pub/rjcarroll/2003.papers.directory/published_F
isher_Lecture.pdf
(There's Powerpoint file on his web page, too.)

Andy

 Heteroscedasticity is 
 telling you that the conditional distributions don't change 
 at a constant 
 rate across all portions of the distribution (think 
 percentiles or more 
 generally quantiles) and, therefore, a function for the mean 
 (no matter 
 how precisely estimated) cannot tell you all there is to know 
 about your 
 dose-response relation.  Why not go after estimating the conditional 
 quantile functions directly with nonlinear quantile 
 regression, function 
 nlrq() in the quantreg package? 
 
 Brian
 
 Brian S. Cade
 
 U. S. Geological Survey
 Fort Collins Science Center
 2150 Centre Ave., Bldg. C
 Fort Collins, CO  80526-8818
 
 email:  [EMAIL PROTECTED]
 tel:  970 226-9326
 
 
 
 Kjetil Brinchmann Halvorsen [EMAIL PROTECTED] 
 Sent by: [EMAIL PROTECTED]
 02/21/2006 03:31 PM
 Please respond to
 [EMAIL PROTECTED]
 
 
 To
 Quin Wills [EMAIL PROTECTED]
 cc
 r-help@stat.math.ethz.ch
 Subject
 Re: [R] How to get around heteroscedasticity with non-linear 
 least squares 
 in R?
 
 
 
 
 
 
 Quin Wills wrote:
  I am using nls to fit dose-response curves but am not sure how to 
 approach
  more robust regression in R to get around the problem of 
 the my error
  showing increased variance with increasing dose. 
  
 
 package sfsmisc  has rnls (robust nls)
 which might be of use.
 
 Kjetil
 
  
  
  My understanding is that rlm or lqs would not be a good 
 idea here.
  'Fairly new to regression work, so apologies if I'm missing 
 something
  obvious.
  
  
  
  
 [[alternative HTML version deleted]]
  
  __
  R-help@stat.math.ethz.ch mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 
 
   [[alternative HTML version deleted]]
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 
 



--
Notice:  This e-mail message, together with any attachments,...{{dropped}}

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


[R] How to access values returned by R functions (to put into vectors)?

2006-02-13 Thread Quin Wills
The question is general for all functions, but here is a specific example -

 

# For the logistic regression of the following correlated variables:

C - c(457,   1371,   4113,  12339,  37017, 111051, 333153, 999459)

E - c(0.003858377, 0.014334578, 0.014092836, 0.737950754, 0.996371828,
0.997482379, 1.005569257, 0.994382856)

 

#  The nls function:

A = nls(E~(Em*C^p)/(C50^p + C^p), start = list(Em=0.8, p=3, C50=1e3))

 

# Returns the following parameter estimates for Em, p and C50:

Nonlinear regression model

  model:  E ~ (Em * C^p)/(C50^p + C^p) 

   data:  parent.frame() 

  Emp  C50 

   0.99891134.7957189 9934.6481397 

 residual sum-of-squares:  0.0002856567

 

How do I access these parameter values from this output/function so that it
would go into a vector c(Em,p,C50)?


[[alternative HTML version deleted]]

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


[R] Installing SJava (I'm almost there, just a little more help please!....please!)

2005-07-27 Thread Quin Wills
Hi. Day three and I’m still struggling with this. Any advice to overcome the
final hurdle will be enormously appreciated. I now have all the right Java
applications etc. in their right places and have managed to get rid of most
errors but still get this:

 

—Making package SJava —

 Building JNI header files... 
adding build stamp to DESCRIPTION 
running src/Makefile.win 
(cd .. ; ./configure.win c:/PROGR~1/R/rw200l) 
/configure.win: not found 
make[3]: *** [config] Error 127 
make[2]: *** [srcDynLib] Error 2 
make[1]: *** [all] Error 2 
Make: *** [pk9—SJava] Error 2 
*** Installation of SJava failed *** 
Removing ‘c:/PROGR~1/R/rw200l/library/SJava’ 

I am Windows XP with SJava (SJava_0.68-0.tar.gz) downloaded to my c drive
(c:\SJava_0.68-0.tar.gz). R is rw2001 (c:\Program Files\R\rw2001). I am
using the following “R CMD INSTALL c:\SJava-0.68-0.tar.gz”.

 

Why is the configure.win file not being found? Where is it looking for it?
My eternal gratitude to anybody willing to take me out of my pain.

 

 


---



 

[[alternative HTML version deleted]]

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

Re: [R] Installing SJava (I'm almost there, just a little more help please!....please!)

2005-07-27 Thread Quin Wills
Hi Duncan

Thank you for responding... I apologise for being so ignorant. I presume
that is a UNIX command - so have just downloaded cygwin (read about that
today) and ran your suggested line. I get:

Chmod: cannot acess 'configure.win'. No such file or directory

I am assuming that isn't good. Is this the configure file I find in SJava?
Do I need to move it somewhere for this to work?

All of the best,
Quin

-Original Message-
From: Duncan Temple Lang [mailto:[EMAIL PROTECTED] 
Sent: 27 July 2005 09:30 PM
To: Quin Wills
Subject: Re: [R] Installing SJava (I'm almost there, just a little more help
please!please!)


Hi.
  It has been a long time since I looked at the Windows
side of things of SJava.

  Is configure.win present _AND_ executable.
Make certain that it is by using
  chmod +x configure.win

 D.

Quin Wills wrote:
 Hi. Day three and I’m still struggling with this. Any advice to overcome
the
 final hurdle will be enormously appreciated. I now have all the right Java
 applications etc. in their right places and have managed to get rid of
most
 errors but still get this:
 
  
 
 —Making package SJava —
 
  Building JNI header files... 
 adding build stamp to DESCRIPTION 
 running src/Makefile.win 
 (cd .. ; ./configure.win c:/PROGR~1/R/rw200l) 
 /configure.win: not found 
 make[3]: *** [config] Error 127 
 make[2]: *** [srcDynLib] Error 2 
 make[1]: *** [all] Error 2 
 Make: *** [pk9—SJava] Error 2 
 *** Installation of SJava failed *** 
 Removing ‘c:/PROGR~1/R/rw200l/library/SJava’ 
 
 I am Windows XP with SJava (SJava_0.68-0.tar.gz) downloaded to my c drive
 (c:\SJava_0.68-0.tar.gz). R is rw2001 (c:\Program Files\R\rw2001). I am
 using the following “R CMD INSTALL c:\SJava-0.68-0.tar.gz”.
 
  
 
 Why is the configure.win file not being found? Where is it looking for it?
 My eternal gratitude to anybody willing to take me out of my pain.
 
  
 
  
 
 
 ---
 
 
 
  
 
   [[alternative HTML version deleted]]
 

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

-- 
Duncan Temple Lang[EMAIL PROTECTED]
Department of Statistics  work:  (530) 752-4782
371 Kerr Hall fax:   (530) 752-7099
One Shields Ave.
University of California at Davis
Davis, CA 95616, USA




---
Incoming mail is certified Virus Free.


 
  

---

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


[R] Anybody have a binary version of SJava for rw2001 (Windows)?

2005-07-26 Thread Quin Wills
I am not a techie and have been struggling 2 days solid to try and install
SJava (the source from http://www.omegahat.org/RSJava/). Does anybody have a
binary file for me (I am Windows XP and rw2001)? I have tried installing
Perl, mingwin and the cygwin tools but still no luck. When I try “R CMD
INSTALL c:\SJava_0.78-0.tar.gz” I get the following (and haven’t a clue what
it could mean):

 

-Making package SJava-- 
Building JNI header files... 
Extracting the classes from Environment.jar 
/jdk1.3/bin/jar: not found 
RForeignReference 
/jdk1.3/bin/javah: not found 
ROmegahat Interpreter 
/jdkl.3/bin/javah: not found 
REvaluator 
/jdkl.3/bin/Javah: not found 
RManualFunctionActionListener 
/jdk1.3/bin/javah: not found 
/jdkl.3/bin/javah: not found 
adding build stamp to DESCRIPTION 
running src/Makefile.win 
(cd ..  ; ./configure.win c:/PROGRW1/R/rw200l) 
/configure.win: not found 
make[3]: *** [conf ig] Error 127 
make[2]: *** [srcDynLib] Error 2 
make[1]: *** [all] Error 2 
make: *** [pkg—SJava] Error 2 
*** Installation of SJava failed *** 

 


---



 

[[alternative HTML version deleted]]

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

[R] Installing SJava

2005-07-25 Thread Quin Wills
Apologies, I am a non-techie so am finding installing SJava (which I need
for RMAGEML) very frustrating indeed. 

 

I am running rw2001 on WindowsXP with Java - jre1.5.0_02. Could somebody
please explain to me step-by-step how to install it as I have tried all the
help files. The website’s (HYPERLINK
http://www.omegahat.org/RSJava/http://www.omegahat.org/RSJava/)
instructions for installing the Windows source are definitely not Windows
commands (are they UNIX? The file is not even a zip as stated in the
instructions!). 

 

I have also tried using the command “R CMD INSTALL HYPERLINK
http://www.omegahat.org/RSJava/SJava_0.68-0.tar.gzSJava_0.68-0.tar.gz” in
R but just get a “syntax error”. I have tried changing the file to a zip and
then installing from the R GUI (“install packages from local zip”) but when
I type library(SJava) I get “Error in library(SJava) : 'SJava' is not a
valid package -- installed  2.0.0?”. 

 

Please could somebody explain any way to do this (step by step) to me like
I’m a two year old. I have no interest in actually calling Java, I just want
to be able to read MAGE-ML. I have saved the source file (HYPERLINK
http://www.omegahat.org/RSJava/SJava_0.68-0.tar.gzSJava_0.68-0.tar.gz) in
my C drive (viz. c:\ HYPERLINK
http://www.omegahat.org/RSJava/SJava_0.68-0.tar.gzSJava_0.68-0.tar.gz)…wh
at now?

 

 


---



 

[[alternative HTML version deleted]]

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