Re: [R] [Rd] Formulas in gam function of mgcv package

2009-08-25 Thread Corrado
: > [Note R-Devel is the wrong list for such questions. R-Help is where this > should have been directed - redirected there now] > > On Mon, 2009-08-24 at 17:02 +0100, Corrado wrote: > > Dear R-experts, > > > > I have a question on the formulas used in the gam function of t

Re: [R] [Rd] Formulas in gam function of mgcv package

2009-08-26 Thread Corrado
make them so. `mgcv' will allow you add main effects and interactions, and > will handle the constraints automatically, but if this sort of functional > ANOVA is a major component of what you want to do, then it is probably > worth checking out the gss package and Chong Gu

Re: [R] [Rd] Formulas in gam function of mgcv package

2009-08-26 Thread Corrado
eciated. > > > > I have also some difficulties in understanding the values you have chosen > > for k in the first example (why 60?). > > > > Thanks > > > > Best, > > > > On Monday 24 August 2009 17:33:55 Gavin Simpson wrote: > > >

Re: [R] Best R text editors?

2009-08-28 Thread Corrado
e level of direct R interface (e.g. Tinn-R, Komodo+SciViews). Thanks! > > --j -- Corrado Topi Global Climate Change & Biodiversity Indicators Area 18,Department of Biology University of York, York, YO10 5YW, UK Phone: + 44 (0) 1904 328645, E-mail: ct...@york.ac.uk ___

Re: [R] Best R text editors?

2009-08-28 Thread Corrado
I am using 3.4.2 not 3.5, I would not know. But it is worth visiting the STATET mailing list archive and subscribe to the mailing list. On Friday 28 August 2009 09:22:14 [Ricardo Rodriguez] Your XEN ICT Team wrote: > Hi! > > Corrado wrote: > > Eclipse + StatET (the R plugin) bo

Re: [R] Google's R Style Guide

2009-08-29 Thread Corrado
as the rule for the trailing "}") or > > is this just aesthetics? > > It's probably just aesthetics. I don't like it because it increases > the number of lines without much real benefit - indenting already > gives you all the hints you need. >

Re: [R] Google's R Style Guide

2009-09-01 Thread Corrado
prescriptive which makes our research group life easier? 2) What class type should I use? From what you two say, I should use S3 because is easier to use what are the disadvantages? Is there an advantages / disadvantages table for S3 and S4 classes? Thanks -- Corrado Topi Global Climate

[R] Strange error returned or bug in gam in mgcv????

2009-09-01 Thread Corrado
est regards -- Corrado Topi Global Climate Change & Biodiversity Indicators Area 18,Department of Biology University of York, York, YO10 5YW, UK Phone: + 44 (0) 1904 328645, E-mail: ct...@york.ac.uk __ R-help@r-project.org mailing list https://stat.

Re: [R] Strange error returned or bug in gam in mgcv????

2009-09-01 Thread Corrado
Nope Of course, it was just a copy and paste problem On Tuesday 01 September 2009 15:00:34 David Winsemius wrote: > On Sep 1, 2009, at 9:51 AM, Corrado wrote: > > Dear friends, > > > > what is this error message in gam I cannot understand what it > >

Re: [R] Strange error returned or bug in gam in mgcv???? - additional information

2009-09-01 Thread Corrado
Here I pasted the code from when I opened the R shell, so that it possible to see what is going on: http://scsys.co.uk:8002/33309?hl=on&submit=Format+it! Thanks in advance -- Corrado Topi Global Climate Change & Biodiversity Indicators Area 18,Department of Biology University of Yo

Re: [R] Strange error returned or bug in gam in mgcv???? - yet more additional information

2009-09-01 Thread Corrado
I am using mgcv 1.4-1.1 on Fedora 9 64 bit on an Opteron server with 8Gb of RAM. On Tuesday 01 September 2009 15:19:28 Corrado wrote: > Here I pasted the code from when I opened the R shell, so that it possible > to see what is going on: > > http://scsys.co.uk:8002/33309?hl=on&

Re: [R] Strange error returned or bug in gam in mgcv????

2009-09-01 Thread Corrado
an you tell > me how many data you are actually trying to fit, and I'll try and track > down exactly where it's failing, and put in a more informative message. > > best, > Simon > > On Tuesday 01 September 2009 14:51, Corrado wrote: > > Dear friends, >

Re: [R] Strange error returned or bug in gam in mgcv????

2009-09-02 Thread Corrado
0.165 -0.165 -0.165 -0.165 ... $ PC9 : num -0.629 -0.629 -0.629 -0.629 -0.629 ... $ PC10 : num 0.26 0.26 0.26 0.26 0.26 ... > It looks ok to me. What do you think? On Tuesday 01 September 2009 18:43:24 Gavin Simpson wrote: > On Tue, 2009-09-01 at 17:55 +0100, Corrado wrote: > &

[R] goodness of "prediction" using a model (lm, glm, gam, brt, regression tree .... )

2009-09-02 Thread Corrado
training Y~T,data=B for predicting I have devised a couple of method based around 1) standard deviation 2) R^2, but I am unhappy with them. Regards -- Corrado Topi Global Climate Change & Biodiversity Indicators Area 18,Department of Biology University of York, York, YO10 5YW, UK Phone: + 44 (0)

[R] Matrix regression

2009-09-07 Thread Corrado
). Any suggestion? I will be more than happy to share the results of my quest with the list or developers. Regards -- Corrado Topi Global Climate Change & Biodiversity Indicators Area 18,Department of Biology University of York, York, YO10 5YW, UK Phone: + 44 (0) 1904 328645, E-mail

[R] Intercept=0 in gam from gam package

2009-09-10 Thread Corrado
Dear R list, is it possible to force the intercept to assume the value of 0 (that is no intercept) in gam from gam package? Regards -- Corrado Topi Global Climate Change & Biodiversity Indicators Area 18,Department of Biology University of York, York, YO10 5YW, UK Phone: + 44 (0) 1904 32

[R] Negative AIC

2009-09-10 Thread Corrado
Dear R list, I just obtained a negative AIC for two models (-221.7E+4 and -230.2E+4). Is that normal? Regards -- Corrado Topi Global Climate Change & Biodiversity Indicators Area 18,Department of Biology University of York, York, YO10 5YW, UK Phone: + 44 (0) 1904 328645, E-mail

Re: [R] Negative AIC

2009-09-10 Thread Corrado
My worry is: can I compare negative AIC with positive AIC? does the comparison still hold? On Thursday 10 September 2009 15:57:01 Ben Bolker wrote: > Corrado-5 wrote: > > Dear R list, > > > > I just obtained a negative AIC for two models (-221.7E+4 > > and -230.2E+4

Re: [R] Negative AIC

2009-09-10 Thread Corrado
e a little > surprised, and think that something was wrong, if you have some AIC > values that are on the order of -20,000 (as below) and others that are > +20,000 ... > > Ben Bolker > > Corrado wrote: > > My worry is: can I compare negative AIC with positive AIC? does

[R] AIC and goodness of prediction - was: Re: goodness of "prediction" using a model (lm, glm, gam, brt,

2009-09-10 Thread Corrado
incorporates bias and variance. Common terms > for what you are looking for are "test error" and "generalization > error". > > > hth, > Kingsford > > On Wed, Sep 2, 2009 at 11:56 PM, Corrado wrote: > > Dear R-friends, > > > > How do y

[R] Help with error on function: Error in .... attempt to apply non-function

2009-09-15 Thread Corrado
t me out what I am doing wrong? kubuntu 904 64 bit, R 2.9.2 Regards -- Corrado Topi Global Climate Change & Biodiversity Indicators Area 18,Department of Biology University of York, York, YO10 5YW, UK Phone: + 44 (0) 1904 328645, E-mail: ct...@york.ac.uk

Re: [R] Help with error on function: Error in .... attempt to apply non-function

2009-09-15 Thread Corrado
Dear Duncan, this is a reproducible example: it is the function copied straight from my Eclipse. I found the mistake (thanks to Peter) On Tuesday 15 September 2009 11:15:29 Duncan Murdoch wrote: > Corrado wrote: > > Dear R gurrus, > > > > I wrote this function >

Re: [R] Help with error on function: Error in .... attempt to apply non-function (Solution)

2009-09-15 Thread Corrado
Dear friends, the problem with the error has been solved (thanks to Peter). The line 41 in http://scsys.co.uk:8002/33852 should be rewritten as M<-k*((x-t[i])*m0+(t[i+k]-x)*m1)/((k-1)*(t[i+k]-t[i])) On Tuesday 15 September 2009 11:32:53 Corrado wrote: -- Corrado Topi Global Climate Cha

[R] identical(length(x), 1) returns FALSE, but print(length(x)) is 1, length(x)==1 is TRUE, and is.integer(lenght(x)) is TRUE????

2009-09-15 Thread Corrado
Dear R, the condition: identical(length(x),1) returns FALSE but print(length(x)) returns 1 and: is.vector(x) is TRUE. is.integer(length(x)) is TRUE length(x) ==1 is TRUE I am puzzled. Regards -- Corrado Topi Global Climate Change & Biodiversity Indicators Area 18,Department of Bio

[R] Function returns different results on the vector as a whole vs. on the values of the vector

2009-09-15 Thread Corrado
ctor() for ( in X) { y<-append(y,mspline(i=h,x=,k=3,t=Q)) } points(X,y,type="l",col="green") } works very differently from using a vectorial approach, that is substituting the inner for iteration with the

Re: [R] identical(length(x), 1) returns FALSE, but print(length(x)) is 1, length(x)==1 is TRUE, and is.integer(lenght(x)) is TRUE????

2009-09-15 Thread Corrado
at more information! Take any vector of length 1, for example x<-1. Plus all the command that where in my previous email What is the logic behind identical(length(x),1) being false? Regards -- Corrado Topi Global Climate Change & Biodiversity Indicators Area 18,Department of Biolog

Re: [R] define a new family (and a new link function) for gam in gam package

2009-09-18 Thread Corrado
Dear David, I am using gam in gam package (not in mgcv) it is possible to force gam in mgcv to behave like gam in gam package? On Thursday 17 September 2009 23:00:17 David Winsemius wrote: > On Sep 17, 2009, at 1:39 PM, Topi, Corrado wrote: > > Dear R list, > > > > is

Re: [R] define a new family (and a new link function) for gam in gam package

2009-09-21 Thread Corrado
16:06:31 Simon Wood wrote: > > I am using gam in gam package (not in mgcv) it is possible to force > > gam in mgcv to behave like gam in gam package? > > -- not *exactly*, no. But what do you want to do? (i.e. what feature of > `gam' do you need?) -- Corrado T

[R] Constrained non linear regression using ML

2010-03-16 Thread Corrado
The nearest thing was nlrob, but even that does not allow for constraints, as far as I can understand. Any suggestion? Regards -- Corrado Topi PhD Researcher Global Climate Change and Biodiversity Area 18,Department of Biology University of York, York, YO10 5YW, UK Phone: + 44 (0) 1904 328645, E-m

Re: [R] Constrained non linear regression using ML

2010-03-17 Thread Corrado
Dear Gabor, dear R users, I had already read the betareg documentation. As far as I can understand from the help, it does not allow for constrained regression. Regards Gabor Grothendieck wrote: Check out the betareg package. On Tue, Mar 16, 2010 at 2:58 PM, Corrado wrote: Dear R

Re: [R] Constrained non linear regression using ML

2010-03-17 Thread Corrado
t The error is strange because, because the function dimnames is not called anywhere. Regards Gabor Grothendieck wrote: Try it anyways -- maybe none of your constraints are active. On Wed, Mar 17, 2010 at 6:01 AM, Corrado wrote: Dear Gabor, dear R users, I had already rea

Re: [R] Constrained non linear regression using ML

2010-03-17 Thread Corrado
that your error term also follows a beta distribution. And it the distribution of the error term which is crucial for specifying the likelihood function. /Arne -- Corrado Topi PhD Researcher Global Climate Change and Biodiversity Area 18,Department of Biology University of York, York, YO10 5YW

Re: [R] Constrained non linear regression using ML

2010-03-18 Thread Corrado
nBUGS/R2WinBUGS, JAGS/r2jags, etc.) On Wed, Mar 17, 2010 at 10:03 AM, Corrado wrote: Dear Arne, Gabor, I solved the problem with betareg (downloaded the package). I run it on my data, and unfortunately the constraint is definitively active, if I remove the active variables, I then remove the

Re: [R] Factor variables with GAM models

2010-03-20 Thread Corrado
-project.org 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. -- Corrado Topi PhD Researcher Global Climate Change and Biodiversity Area 18,D

[R] Changing content of column in data.frame + efficient join extraction between 2 data.frames

2010-03-23 Thread Corrado
ower case. 2) I would like to extract the rows from the first one (pcs) where pcs$str_1 is the same as East$str_1. I have even tried regexp, but cannot modify the content of pcs$str_1 to remove the inveretd commas " and change the case to lowercase. How do I do that? Regards -- Corrado

Re: [R] S4: Multiple inheritance

2010-03-23 Thread Corrado
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. -- Corrado Topi PhD Researcher Global Climate Change and Biodiversity Area 18,Department of Biology Universit

[R] Error "singular gradient matrix at initial parameter estimates" in nls

2010-03-30 Thread Corrado
o, if my n is 4, then the nls works perfectly (but that excludes all the k5 kn). Can anyone help me with suggestions? Thanks in advance. Alternatively, what do you suggest I should do? Shall I abandon nls in favour of optim? Regards -- Corrado Topi PhD Researcher Global Climate

[R] From THE R BOOK -> Warning: In eval(expr, envir, enclos) : non-integer #successes in a binomial glm!

2010-03-30 Thread Corrado
ept)x -0.3603 0.4480 Degrees of Freedom: 510554 Total (i.e. Null); 510553 Residual Null Deviance: 24420 Residual Deviance: 23240AIC: 700700 Warning message: In eval(expr, envir, enclos) : non-integer #successes in a binomial glm! > Regards -- Corrado To

Re: [R] Error "singular gradient matrix at initial parameter

2010-03-30 Thread Corrado
Hi Gabor, same problem even using nls2 with method=brute-force to calculate the initial parameters. Best, Gabor Grothendieck wrote: You could try method="brute-force" in the nls2 package to find starting values. On Tue, Mar 30, 2010 at 7:03 AM, Corrado wrote: I am using nl

Re: [R] Error "singular gradient matrix at initial parameter

2010-03-30 Thread Corrado
Yes, of course. The problem still stays. Gabor Grothendieck wrote: Sorry, its algorithm="brute-force" On Tue, Mar 30, 2010 at 10:29 AM, Corrado wrote: Hi Gabor, same problem even using nls2 with method=brute-force to calculate the initial parameters. Best, Gabor Grothend

Re: [R] From THE R BOOK -> Warning: In eval(expr, envir, enclos) : non-integer #successes in a binomial glm!

2010-03-30 Thread Corrado
ppropriate, but only when I am certain I am not doing anything wrong. Regards -- Corrado Topi PhD Researcher Global Climate Change and Biodiversity Area 18,Department of Biology University of York, York, YO10 5YW, UK Phone: + 44 (0) 1904 328645, E-ma

Re: [R] From THE R BOOK -> Warning: In eval(expr, envir, enclos) : non-integer #successes in a binomial glm!

2010-03-30 Thread Corrado
ou can check at page 514/515. Rubén Roa wrote: -Mensaje original- De: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] En nombre de Corrado Enviado el: martes, 30 de marzo de 2010 16:52 Para: r-help@r-project.org Asunto: [R] From THE R BOOK -> Warning: In eval(expr, env

Re: [R] Error "singular gradient matrix at initial parameter estimates" in nls

2010-03-31 Thread Corrado
is interested more or less in an interpolating function rather than doing statistics, and I can understand the reluctance of statisticians to countenance such a use of nls. And Bert's comment on overparametrization is almost certainly valid also. JN -- Corrado Topi PhD Researcher Glo

Re: [R] SAS user now converting to R - Help with Transpose

2009-09-28 Thread Corrado
R-help@r-project.org 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-

Re: [R] Something wrong with my function Please Help

2009-09-29 Thread Corrado
x[1,])))/(x[2,1]/(sum(x[2,]))) > + return(OR);return(RR) > + } > > > tt<-matrix(data=1:4,nrow=2,ncol=2) > > OR.RR(tt) > > Error in OR.RR(tt) : subscript out of bounds > > Many Thanks > Tu -- Corrado Topi Global Climate Change & Biodiversity I

[R] A point in a vector?

2009-09-30 Thread Corrado
g from element j=7 to the element j+1=8. Can we do that with an R command? Regards -- Corrado Topi Global Climate Change & Biodiversity Indicators Area 18,Department of Biology University of York, York, YO10 5YW, UK Phone: + 44 (0) 1904 328645, E-mail: ct...@

[R] Problem with dist (bug?)

2009-10-02 Thread Corrado
Any clue? Package dist 0.4-3 on R 2.9.2 on Kubuntu 904 64 bit. Regards -- Corrado Topi Global Climate Change & Biodiversity Indicators Area 18,Department of Biology University of York, York, YO10 5YW, UK Phone: + 44 (0) 1904 328645, E-mail: ct...@york.ac.uk __

Re: [R] Problem with dist (bug?)

2009-10-02 Thread Corrado
ot.csv to under 200MB, but I thought of not posting it to the list > We need to see the data and the script that produced the error. > > On Fri, Oct 2, 2009 at 5:06 AM, Corrado wrote: > > Dear list, > > > > using package "proxy". > > > >

Re: [R] Fetch large sized file from SQL

2009-10-02 Thread Corrado
g guide > http://www.R-project.org/posting-guide.html and provide commented, minimal, > self-contained, reproducible code. -- Corrado Topi Global Climate Change & Biodiversity Indicators Area 18,Department of Biology University of York, York, YO10 5YW, UK P

Re: [R] Fetch large sized file from SQL

2009-10-02 Thread Corrado
rge, therefore odbc > can sqlQuery() can not handel it. > > On Fri, Oct 2, 2009 at 2:14 PM, Corrado wrote: > > You can try using RODBC, it allows you to connect to databases using the > > ODBC > > driver. > > > > I had some difficulties using it with the postgresS

[R] IRLS or other iteratively re weighted optimization algorithms with constraints in R

2009-10-06 Thread Corrado
Dear list, is there an iterative re weighted least square based algorithm or any or other iteratively re weighted optimisation algorithms for non linear (and possibly non parametric) optimisation problems with constraints available in R? Regards -- Corrado

[R] Concave hull

2009-11-25 Thread Corrado
Dear friends, Do you know how to calculate the CONCAVE hull of a set of points (2- dimensional or n-dimensional)? is that possible in R? (With a "smoothing" parameter of course). Best, -- Corrado Topi Global Climate Change & Biodiversity Indicators Area 18,Department of Biology

[R] Distance between sets of points in transformed environmental space

2009-12-01 Thread Corrado
ther approaches worth considering? Kind Regards -- Corrado Topi Global Climate Change & Biodiversity Indicators Area 18,Department of Biology University of York, York, YO10 5YW, UK Phone: + 44 (0) 1904 328645, E-mail: ct...@york.ac.uk __ R-help@r-

Re: [R] Distance between sets of points in transformed environmental space

2009-12-01 Thread Corrado
h set. > > > > There are also a lot of fancy things out there, so someone will > > probably come up with a much fancier (and possibly better) idea than > > this. > > > > Well, that's just my rant, before I go to bed. > &

[R] R base 2.7.2 packaged for Mandriva 2008.1 x86_64: anyone interested?

2008-09-04 Thread Corrado
I have packaged R base 2.7.2 for Mandriva 2008.1 x86_64 who should I send it to so that it can be made available to everybody? It is my first attempt and it works well on my computer, but it will need some testing. Best, -- Corrado Topi Global Climate Change & Biodiversity Indica

Re: [R] Principal Component Analysis - Selecting compo nents? + right choice?

2008-12-17 Thread Corrado
; Email: rvarad...@jhmi.edu > > Webpage: http://www.jhsph.edu/agingandhealth/People/Faculty/Varadhan.html > > > > --- >- > > > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of S Ellison > Sent: Thursday, December 11,

[R] Using very large matrix

2009-02-25 Thread Corrado
Any suggestions? I have searched the mailing list, but to no avail. Best, -- Corrado Topi Global Climate Change & Biodiversity Indicators Area 18,Department of Biology University of York, York, YO10 5YW, UK Phone: + 44 (0) 1904 328645, E-mail: ct...@york.a

[R] Similarity between clusters generated by hclust + cutree

2009-02-25 Thread Corrado
8 clusters, for example as (1-distance or dissimilarity) between the centroids. Any clue on how I can do that? Regards -- Corrado Topi Global Climate Change & Biodiversity Indicators Area 18,Department of Biology University of York, York, YO10 5YW, UK Phone: + 44 (0) 1904 328645, E-ma

[R] Distance between clusters

2009-03-02 Thread Corrado
ist(dissimilarityMatrix) hctr<-hclust(distPredTurn,"ward") cutree(hctr,k=48) Regards -- Corrado Topi Global Climate Change & Biodiversity Indicators Area 18,Department of Biology University of York, York, YO10 5YW, UK Phone: + 44 (0) 1904 328645, E-ma

Re: [R] Using very large matrix

2009-03-02 Thread Corrado
. Best, On Thursday 26 February 2009 15:43:11 Jay Emerson wrote: > Corrado, > > Package bigmemory has undergone a major re-engineering and will be > available soon (available now in Beta version upon request). The version > currently on CRAN > is probably of limited use unle

[R] *** buffer overflow detected ***: /usr/lib64/R/bin/exec/R terminated on R 2.6.2 to 2.8.0: logging a bug?

2008-10-31 Thread Corrado
00 r--p 08:02 892500 /usr/share/locale/en_GB.UTF-8/LC_MAborted [EMAIL PROTECTED]:~$ OS: Mandriva 2008.1 x86_64 Postgresql: 8.3.1 (PostGIS enabled) R: from 2.6.2 from repository to 2.8.0 repackaged Is it my doing, or R's doing?

[R] Principal Component Analysis - Selecting components? + right choice?

2008-12-11 Thread Corrado
would have been better off by using something different from PCA? Best, -- Corrado Topi Global Climate Change & Biodiversity Indicators Area 18,Department of Biology University of York, York, YO10 5YW, UK Phone: + 44 (0) 1904 328645, E-mail: [EMAIL PROTE

[R] define a new family (and a new link function) for gam in gam package

2009-09-17 Thread Topi, Corrado
Dear R list, is it possible to define a new family (and a new link function) for gam in gam package? How? I read the help for gam, family, gam.model, make.link but I did not find a solution. Regards -- Corrado Topi Area 18,Department of Biology University of York, York, YO10 5YW, UK Phone

Re: [R] Concave hull

2009-11-26 Thread Corrado Topi
+sd(yy) ) , h=c(bandwidth.nrd(xx)/4, bandwidth.nrd(xx)/ 4) ) contour(dens2, add=TRUE) # You can pick a single contour if you like: contour(dens2, level=0.05, col="red", add=TRUE) contour(dens2, level=0.10, col="blue", add=TRUE) contour(dens2, level=0.005, col="

[R] Summer student internship placement at University of York / YCCSA / SEI (paid)

2011-04-29 Thread Corrado Topi
reference (not just contact details). Your application will not be accepted without this reference (max 1 page). Best, -- Corrado Topi Stockholm Environment Institute Mob: +44 (0) 7769 601784 Tel: +44 (0) 1904 322893 Skype: corrado-eeos Website: sei-international.org University of York York

[R] installing source package RGtk2 on mac os x 10.4.11

2008-05-25 Thread Corrado Giannasca
rsions/2.7/Resources/library/ RGtk2/libs/i386/*: No such file or directory ERROR: compilation failed for package 'RGtk2' ** Removing '/Library/Frameworks/R.framework/Versions/2.7/Resources/ library/RGtk2' CAN ANYONE HELP IN RESOLVING THIS ERROR? Thank you very m