Paul Roebuck | 1 Apr 2006 01:03
Favicon

Re: Disable LazyLoading mechanism completely

On Fri, 31 Mar 2006, Duncan Murdoch wrote:

> On 3/31/2006 5:15 PM, Paul Roebuck wrote:
> > Is there a global option somewhere that can completely
> > disable the LazyLoad option? I want all my packages
> > in source format for searching purposes, crippled by
> > the conversion to database format.
>
> Why not just keep the source?  Maybe I misunderstood where
> you're thinking of searching, but I think even without
> LazyLoad, you'll lose comments in the functions.

My thought is something along the lines of

options(lazy.load = FALSE)

which would override the setting in the DESCRIPTION file
as though every package had set it as:

LazyLoad: no

I want the ability to patch/search the code by default.
LazyLoad removes this capability. I know there will be a
minor speed hit and accept that in exchange for the above
capability.

----------------------------------------------------------
SIGSIG -- signature too long (core dumped)

______________________________________________
(Continue reading)

Bruno L. Giordano | 1 Apr 2006 01:25
Picon
Favicon

clusters centroid and distances

Dear R-list.

I would need to know if the centroid of a cluster, whose coordinates are the 
average of the coordinates of the points in the cluster,

is also the point that minimizes the sum of its distances from all the 
points in the cluster.

If so, where could I find a proof?

Since I understand this question is not directly connected to R, I would 
greatly appreciate if someone could just point me to a more appropriate 
mailing list.

Thank you,

    Bruno

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Bruno L. Giordano, Ph.D.
CIRMMT
Schulich School of Music, McGill University
555 Sherbrooke Street West
Montréal, QC H3A 1E3
Canada
http://www.music.mcgill.ca/~bruno/

______________________________________________
R-help <at> stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
(Continue reading)

Linda Lei | 1 Apr 2006 02:13
Picon
Favicon

reference paper about SOM

Hi All,

I'm looking for some reference paper about SOM (self organizing map)
algorithm. I tried the paper which is mentioned in 

the help page of function "som (package:som)":
http://www.cis.hut.fi/research/papers/som_tr96.ps.Z

But I can't open it for some reason. Could you please help me with it ?

Thanks a lot!

	[[alternative HTML version deleted]]

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

Urania Sun | 1 Apr 2006 04:21
Picon

small sample size confidence interval by bootstrap

Hi, All:

I only have 4 samples. I wish to get a confidence interval around the mean.
Is it reasonable? If not, is there a way to compute a confidence interval
for such small sample size's mean?

Many thanks,

U

	[[alternative HTML version deleted]]

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

Murray Jorgensen | 1 Apr 2006 06:58
Picon
Picon

Nested error structure in nonlinear model

I am trying to fit a nonlinear regression model to data. There are 
several predictor variables and 8 parameters. I will write the model as

Y ~ Yhat(theta1,...,theta8)

OK, I can do this using nls() - but "only just" as there are not as many 
observations as might be desired.

Now the problem is that we have a factor "Site" and I want to include a 
corresponding error component. I tried something like (excuse the 
doctored R output):

 > mod0.nlme <-  nlme(Y ~ Yhat(theta1,...,theta8) + site.err ,
+                    start = c(mod0.st,0),
+                    groups = ~ Site,
+                   fixed = theta1 + ... + theta8 ~ 1,
+                   random = site.err ~ 1)
Error in nlme.formula(Y ~ Yhat(theta1,...,theta8  :
         starting values for the fixed component are not the correct length

and then

 > mod0.nlme <-  nlme(Y ~ Yhat(theta1,...,theta8) + site.err ,
+                    start = mod0.st,
+                    groups = ~ Site,
+                   fixed = theta1 + ... + theta8 ~ 1,
+                   random = site.err ~ 1)
Error: Singularity in backsolve at level 0, block 1

The straightforward way would be to go
(Continue reading)

Picon
Favicon

help with vectorizing a function

Dear r-helpers,

I am developing a smoothing function that performs a casewise deletion of all 
the non-informative observations in a bivariate dataset following the Poisson - 
D'Avril algorythm.

But I am now facing two problems: 
1)Being based on loops, the function takes a lot of time before having done its 
work and even if I tried I was not able to vectorize it. 
2) I cannot control the degree of smoothing.

I have read the posting guide, the FAQ and have also RSiteSearched but without 
success. 

Can anybody help me?

Here is an example of the procedure:
(i have noticed also a different behaviour on different machines)
##################################

x <- rnorm(1000, sd=15)
y <- -x + rnorm(1000, sd=15)

plot(x, y,  ann=F, pch=16,   
      xlim=c(-50,50), ylim=c(-50, 50), asp=1,   col=2)

abline(lm(y ~ x))  

metamat<-c( 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0,
            1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0,
(Continue reading)

Prof Brian Ripley | 1 Apr 2006 08:58
Picon
Picon
Favicon

Re: Disable LazyLoading mechanism completely

On Fri, 31 Mar 2006, Dirk Eddelbuettel wrote:

>
> On 31 March 2006 at 16:15, Paul Roebuck wrote:
> | Is there a global option somewhere that can completely
> | disable the LazyLoad option? I want all my packages
> | in source format for searching purposes, crippled by
> | the conversion to database format.
>
> AFAICT setting LazyLoad=No in DESCRIPTION might do the trick.
>
> For reasons I fail to understand I have to set it to that value for Debian
> builds of the Rcmdr package, and the resulting package does indeed have R
> code as plain sources. I'd agree with you that being able to read, and hence
> search, the code is a good thing but I also trust the R masters on the
> advantages of lazy loading.  There may be an option to diable it globally ...

Quite a large number of packages (including almost all using S4 methods) 
*do not work* without lazyloading or saved images.  So this option would 
just break other people's work.

Rcmdr comes with LazyLoad: no in its DESCRIPTION file (so I have no idea 
why you need to do anything different).  John Fox and I worked out why 
this was needed, and that lazy loading was not helpful as that package 
does access almost all its code at startup.

--

-- 
Brian D. Ripley,                  ripley <at> stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
(Continue reading)

Prof Brian Ripley | 1 Apr 2006 09:06
Picon
Picon
Favicon

Re: add1() and glm

See McCullagh and Nelder (1989) (and the source code).

On Fri, 31 Mar 2006, Chad Reyhan Bhatti wrote:

> Hello,
>
> I have a question about the add1() function and quasilikelihoods for GLMs.
> I am fitting quasi-Poisson models using  glm(, family = quasipoisson).
> Technically, with the quasilikelihood approach the deviance does not have
> the interpretation as a likelihood-based measure of sample information.
> Functions such as stepAIC() cannot be used.  The function add1() returns
> the change in the scaled deviance between the null model and the
> alternative model along with a chi-sq p-value.

Not true.  You choose a suitable test, and for quasipoisson the F test is 
the appropriate choice and that does not give `a chi-sq p-value'.

If the dispersion is estimated, it is estimated via the residual deviance 
(as it says on the help page) and that has a degrees of freedom in the 
model output.  The test is done in exactly the same way as a lm fit, just 
replacing sums of squares by deviances (and indeed, exactly as a Gaussian 
glm fit).

> Agresti, (Categorical Data Analysis p.140 last sentence before Section
> 4.5.2), makes the statement "For some GLMs the scaled deviance has an
> approximate chi-squared distribution." with no details, no references, and
> no degrees of freedom.
>
> Does anyone know:
>
(Continue reading)

Prof Brian Ripley | 1 Apr 2006 10:08
Picon
Picon
Favicon

Re: small sample size confidence interval by bootstrap

On Fri, 31 Mar 2006, Urania Sun wrote:

> I only have 4 samples. I wish to get a confidence interval around the mean.
> Is it reasonable? If not, is there a way to compute a confidence interval
> for such small sample size's mean?

(BTW, the CI is for the population mean, not the sample mean.  I'll also 
assume that you are prepared to assume that you have a single random 
sample of size 4 from a location family.)

For a confidence interval, you need to make some assumptions about the 
distribution.  If you assume normality, you can use t.test, but the 
estimate of the standard deviation (on just 3 df) will be very variable 
and this will be reflected in the length of the CI.

Your subject line mentions the bootstrap.  You could use one of several 
different types of bootstrap CI but they also make assumptions, weaker 
assumptions that lead to even more variability.  For a sample of size 4 
there are (at most) 36 distinct means of bootstrap resamples, so none of 
the methods I know of will work adequately (and most not at all).

As an example to ponder, the Cauchy distribution does not even have a 
mean, but from small samples you will have no idea that is very 
long-tailed.  And getting a CI for a location parameter is often better 
done from a robust estimator of location than from the sample mean.
Alternatively, your true distribution might be a discrete distribution on 
5 points, and you have no idea at all about the 5th value.

--

-- 
Brian D. Ripley,                  ripley <at> stats.ox.ac.uk
(Continue reading)

Paul Roebuck | 1 Apr 2006 12:23
Favicon

Re: Disable LazyLoading mechanism completely

On Sat, 1 Apr 2006, Prof Brian Ripley wrote:

> On Fri, 31 Mar 2006, Dirk Eddelbuettel wrote:
>
> > On 31 March 2006 at 16:15, Paul Roebuck wrote:
> > | Is there a global option somewhere that can completely
> > | disable the LazyLoad option? I want all my packages
> > | in source format for searching purposes, crippled by
> > | the conversion to database format.
> >
> > AFAICT setting LazyLoad=No in DESCRIPTION might do the trick.
> >
> > For reasons I fail to understand I have to set it to that value for Debian
> > builds of the Rcmdr package, and the resulting package does indeed have R
> > code as plain sources. I'd agree with you that being able to read, and hence
> > search, the code is a good thing but I also trust the R masters on the
> > advantages of lazy loading.  There may be an option to diable it globally ...
>
> Quite a large number of packages (including almost all using S4 methods)
> *do not work* without lazyloading or saved images.  So this option would
> just break other people's work.

Can you elaborate a bit on this statement? S4 predates
LazyLoad and used to work just fine before that mechanism
was introduced. Indeed, several of my own packages have S4
methods and work with neither LazyLoading nor saved images.
Should that be read as "since package authors made one-way
changes to support LazyLoad"? Is there some way to tell
whether a package can do without it?

(Continue reading)


Gmane