Displaying 20 results from an estimated 3000 matches similar to: "Principal Component Analysis - Selecting components? + right choice?"
2010 Mar 30
6
Error "singular gradient matrix at initial parameter estimates" in nls
I am using nls to fit a non linear function to some data.
The non linear function is:
y= 1- exp(-(k0+k1*p1+ .... + kn*pn))
I have chosen algorithm "port", with lower boundary is 0 for all of the
ki parameters, and I have tried many start values for the parameters ki
(including generating them at random).
If I fit the non linear function to the same data using an external
2009 Sep 30
3
A point in a vector?
Dear list,
I have a strange requirement .... I have a vector, for example v<-
c(0,0,0,0,1,2,4,6,8,8,8,8). I have a value,for example x<- 4.8.
I would like to understand in which sub interval of v is x. In this case, v
would be in the sub interval [4,6] that is in the subinterval starting from
element j=7 to the element j+1=8.
Can we do that with an R command?
Regards
--
Corrado Topi
2009 Sep 01
3
Strange error returned or bug in gam in mgcv????
Dear friends,
what is this error message in gam???? I cannot understand what it means ....
is it a bug?
gam_bray_scot24_pc_0505<gam(bray~s(PC1,PC2,PC3,PC4,PC5,
PC1.1,PC2.1,PC3.1,PC4.1,PC5.1),data=dist_scot24_vector_with_climate)
Error in if (length(data) != vl) { :
missing value where TRUE/FALSE needed
Calls: gam ... smooth.construct -> smooth.construct.tp.smooth.spec -> array
In
2009 Sep 03
3
goodness of "prediction" using a model (lm, glm, gam, brt, regression tree .... )
Dear R-friends,
How do you test the goodness of prediction of a model, when you predict on a
set of data DIFFERENT from the training set?
I explain myself: you train your model M (e.g. glm,gam,regression tree, brt)
on a set of data A with a response variable Y. You then predict the value of
that same response variable Y on a different set of data B (e.g. predict.glm,
predict.gam and so on).
From THE R BOOK -> Warning: In eval(expr, envir, enclos) : non-integer #successes in a binomial glm!
2010 Mar 30
3
From THE R BOOK -> Warning: In eval(expr, envir, enclos) : non-integer #successes in a binomial glm!
Dear friends,
I am testing glm as at page 514/515 of THE R BOOK by M.Crawley, that is
on proportion data.
I use glm(y~x1+,family=binomial)
y is a proportion in (0,1), and x is a real number.
I get the error:
In eval(expr, envir, enclos) : non-integer #successes in a binomial glm!
But that is exactly what was suggested in the book, where there is no
mention of a similar warning. Where am I
2009 Nov 25
3
Concave hull
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
University of York, York, YO10 5YW, UK
Phone: + 44 (0) 1904 328645, E-mail: ct529 at york.ac.uk
2009 Dec 01
2
Distance between sets of points in transformed environmental space
Dear friends,
I have several sets of points in a transformed environmental space. Each set
of points can be represented as a cloud in the environmental space.
This space is spanned by n coordinates, corresponding to the first n PCs of 36
PCs of some environmental variables (12 monthly minimum temperatures, 12
monthly maximum temperature, 12 monthly precipitations).
I would like to calculate
2009 Apr 03
1
Weighted principal components analysis?
Hello R-ers,
I'm trying to do a weighted principal components analysis. I couldn't find any such option with princomp or prcomp. Does anyone know of a package or way to do this?
More specifically, the observations I'm working with are averages from populations of varying sizes. I thus need to weight the observations by sample size. Ideally I could apply these weights at the cell
2009 Sep 10
2
Negative AIC
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: ct529 at york.ac.uk
2009 Feb 25
3
Using very large matrix
Dear friends,
I have to use a very large matrix. Something of the sort of
matrix(80000,80000,n) .... where n is something numeric of the sort 0.xxxxxx
I have not found a way of doing it. I keep getting the error
Error in matrix(nrow = 80000, ncol = 80000, 0.2) : too many elements specified
Any suggestions? I have searched the mailing list, but to no avail.
Best,
--
Corrado Topi
Global
2009 Aug 27
19
Best R text editors?
Quick informal poll: what is everyone's favorite text editor for working
with R? I'd like to hear from people who are using editors that have
some level of direct R interface (e.g. Tinn-R, Komodo+SciViews). Thanks!
--j
--
Jonathan A. Greenberg, PhD
Postdoctoral Scholar
Center for Spatial Technologies and Remote Sensing (CSTARS)
University of California, Davis
One Shields Avenue
The
2010 May 18
2
Function that is giving me a headache- any help appreciated (automatic read )
note: whole function is below- I am sure I am doing something silly.
when I use it like USGS(input="precipitation") it is choking on the
precip.1 <- subset(DF, precipitation!="NA")
b <- ddply(precip.1$precipitation, .(precip.1$gauge_name), cumsum)
DF.precip <- precip.1
DF.precip$precipitation <- b$.data
part, but runs fine outside of the function:
days=7
2009 Aug 24
2
Formulas in gam function of mgcv package
Dear R-experts,
I have a question on the formulas used in the gam function of the mgcv
package.
I am trying to understand the relationships between:
y~s(x1)+s(x2)+s(x3)+s(x4)
and
y~s(x1,x2,x3,x4)
Does the latter contain the former? what about the smoothers of all
interaction terms?
I have (tried to) read the manual pages of gam, formula.gam, smooth.terms,
linear.functional.terms but
2009 Aug 24
2
Formulas in gam function of mgcv package
Dear R-experts,
I have a question on the formulas used in the gam function of the mgcv
package.
I am trying to understand the relationships between:
y~s(x1)+s(x2)+s(x3)+s(x4)
and
y~s(x1,x2,x3,x4)
Does the latter contain the former? what about the smoothers of all
interaction terms?
I have (tried to) read the manual pages of gam, formula.gam, smooth.terms,
linear.functional.terms but
2010 Jun 06
2
Color scale graphic
Hello
Recently, I've been dealing with a seemingly simple problem. I have a table
with two columns filled with values from a test I made (say, amount of
precipitation and Months measured). Now, instead of plotting a typical
linear graphic with precipitation on the y-axis and the months in the
x-axys, I would like to "convert" the values of precipitation in a color
gradient,
2013 Feb 23
1
Extract, sum and Loop in R
Hi all,
I have gone through some basics of R in eclipse environment. What I need to
work is more than basic level so I could not find out the solution by
myself. could anyone help me ?
My case,
I have climate data (precipitation) in nc format with single layer for each
time interval in a day. That means for January 1, 2013, I have 8 separate
files each containing 3 hrs cumulative precipitation
2007 May 24
6
Sum per hour
Dear all,
I have a list of precipitation record and a list of time
I would like to sum them up per hour, or per day.
Does such a function exist ?
example:
time<-c("2000-10-03 14:00:00","2000-10-03 14:10:00","2000-10-03
14:20:00","2000-10-03 15:30:00","2000-10-03 16:40:00","2000-10-03
16:50:00","2000-10-03
2011 Jun 07
1
count length of continues elements in a vector
I am performing a precipitation analysis. data is in the form of daily
precipitation amounts, e.g.
x<- c(4,5,3,0,0,0,2,4,6,4,0,0,0,2,2,0,3,4,1,0,...)
I would like to find the length of the "storm", length of storm would be
defined as the number of days with continues precipitation. in this case the
returned vector would be:
(3,4,2,3,...)
I would also like the amount of
2009 Aug 18
2
value of nth percentile
Dear All,
I have to get the value of say 90th percentile of precipitation time series.. The series is of daily precipitation value of 96 years, I have to to get 90the percentile value of daily precipitation each year. If you know the R code or command for this please let me know.
I would appreciate your early response.
Thanking you,
Sincerely,
Ajay.
2002 Dec 04
1
Interpreting canonical correlation (cancor) results
Hi,
from what I understand about the canonical correlation function
'cancor', it looks for correlations in two sets of variables, each
represented in matrix form. Right? Sounds exactly like what I need.
I have tried the following but I am not sure how to interpret the results.
AudioPCs <- c(ArTHarF0PCA$x[,2], ArTHarF1PCA$x[,2], ArTHarF2PCA$x[,2],
ArTHarF3PCA$x[,2],