Displaying 20 results from an estimated 4000 matches similar to: "Time series in R"
2001 Sep 25
1
rbinding dataframes
I've got a data frame which I've split by a factor,
creating a list of dataframes which I have then done
various operations on individually. I next want to
recombine the resulting dataframes (still held in a list,
still with the same number of columns with the same names)
and there does not appear to be a `good' way to do this -
at the moment, I'm using a for-loop with the rbind
2006 Apr 11
1
gaussian family change suggestion
Hi,
Currently the `gaussian' family's initialization code signals an error if
any response data are zero or negative and a log link is used. Given that
zero or negative response data are perfectly legitimate under the GLM
fitted using `gaussian("log")', this seems a bit unsatisfactory. Might
it be worth changing it?
The current offending code from `gaussian' is:
2011 Jan 14
1
naresid.exclude query
x <- NA
na.act <- na.action(na.exclude(x))
y <- rep(0,0)
naresid(na.act,y)
... currently produces the result...
numeric(0)
... whereas the documentation might lead you to expect
NA
The behaviour is caused by the line
if (length(x) == 0L) return(x)
in `stats:::naresid.exclude'. Removing this line results in the behaviour I'd
expected in the above example (and in a
2002 Nov 27
1
R on the Zaurus
Hello All,
I have a working port of R on my SL5500. I've not tested the X windowing
support yet, but was more concerned about the accuracy of the fp emulation.
The following is the result of the test which Stuart Leask recommended I
should try:
Mandrake 8.2
> x<-NA
> is.na(x)
[1] TRUE
> x+1
[1] NA
> 2*x
[1] NA
Zaurus OZ3
> x<-NA
> is.na(x)
[1] TRUE
> x+1
[1] 1
2007 Oct 02
3
mcv package gamm function Error in chol(XVX + S)
Hi all R users !
I'm using gamm function from Simon Wood's mgcv package, to fit a spatial
regression Generalized Additive Mixed Model, as covariates I have the
geographical longitude and latitude locations of indexed data. I include a
random effect for each district (dist) so the code is
fit <- gamm(y~s(lon,lat,bs="tp", m=2)+offset(log(exp.)),
random=list(dist=~1),
2011 May 17
1
adding up elements within a list
Dear R users
I have a list, as follows:
> intvl.period.myrs
$Devonian
[1] 4.8 4.2 9.5 5.7
$Ordovician
[1] 7.2 5.1 10.2 1.9
$Silurian
[1] 4.7 3.0 7.8 2.0 3.3 1.6 2.6 2.7
I want to write a loop that will sum up the values in each part, and give me a
vector containing the (in this case 3) summed values
this is what I have so far:
for (i in 1:length(names(intvl.periods.myrs)) {
2006 Jun 24
3
getting the smoother matrix from smooth.spline
Can anyone tell me the trick for obtaining the smoother matrix from smooth.spline when there are non-unique values for x. I have the following code but, of course, it only works when all values of x are unique.
## get the smoother matrix (x having unique values
smooth.matrix = function(x, df){
n = length(x);
A = matrix(0, n, n);
for(i in 1:n){
y = rep(0, n); y[i]=1;
yi =
2010 Oct 08
1
many datasets run with one R script in a computer cluster
Hello Everyone
I have an R script (and a source file which I keep my functions) that
I need to run on 70 data sets (each consisting of a pair of files).
I wish to run these data sets in a computer cluster that is run by my
uni (HOWEVER they cannot help me with this problem but say it is
do-able)
the cluster is clever enough that if i set my data up as follows:
within one folder called
2012 Feb 17
2
Error message in gamm. Problem with temporal correlation structure
HELLO ALL,
I AM GETTING AN ERROR MESSAGE WHEN TRYING TO RUN A GAMM MODEL LIKE THE ONE BELOW.
I AM USING R VERSION 2.14.1 (2011-12-22) AND MGCV 1.7-12.
M1 <-gamm(DepVar ~ Treatment + s(Year, by =Treatment), random=list(Block=~1), na.action=na.omit, data = mydata, correlation = corARMA(form =~ Year|Treatment, p = 1, q = 0))
THIS IS THE ERROR MESSAGE
Error in `*tmp*`[[k]] : attempt to
2010 Oct 07
2
text/mtext axis labels on graphs
Hello everyone
I have problem with axis labels on graphs, I have my code as below:
plot(0,0,xlim=c(1,ncol(PA)),ylim=c(1,nrow(PA)),main="Stratigraphic
Range",xlab="Time
Bins",ylab="Taxa",cex.axis=1.5,cex.lab=2,cex.main=2.5,mgp=c(5,1.5,0),xaxt="n")
text(1:(length(strat_name)), y= 0, adj=1,
srt=45,labels=strat_name,xpd=TRUE, cex=1) #adds text to x
2011 Nov 09
2
Problem with simple random slope in gam and bam (mgcv package)
Dear useRs,
This is the first time I post to this list and I would appreciate any
help available. I've used the excellent mgcv package for a while now
to investigate geographical patterns of language variation, and it has
has always worked without any problems for me. The problem below
occurs using R 2.14.0 (both 32 and 64 bit versions in Windows and the
64 bit version in Unix) and mgcv (both
2007 Oct 09
2
Help with gamm errors
Dear All
Hopefully someone out there can point out what I am missing! I have a
(large, several hundred) dataset of gardens in which over two years the
presence/absence of a particular bird species is noted each week. I have
good reason to believe there is a difference between the two years in the
weekly proportion of gardens and would like to assess this, before going on
to look in more detail at
2008 Jun 09
1
package mgcv
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?...
Nom : non disponible
URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20080609/960593f6/attachment.asc>
2008 Apr 09
1
mgcv::predict.gam lpmatrix for prediction outside of R
This is in regards to the suggested use of type="lpmatrix" in the
documentation for mgcv::predict.gam. Could one not get the same result more
simply by using type="terms" and interpolating each term directly? What is
the advantage of the lpmatrix approach for prediction outside R? Thanks.
--
View this message in context:
2007 Nov 25
1
GAM with constraints
Hi,
I am trying to build GAM with linear constraints, for a general link
function, not only identity. If I understand it correctly, the function
pcls() can solve the problem, if the smoothness penalties are given.
What I need is to incorporate the constraints before calculating the
penalties. Can this be done in R?
Any help would be greately appreciated.
--
View this message in context:
2007 Jun 22
1
two basic question regarding model selection in GAM
Qusetion #1
*********
Model selection in GAM can be done by using:
1. step.gam {gam} : A directional stepwise search
2. gam {mgcv} : Smoothness estimation using GCV or UBRE/AIC criterion
Suppose my model starts with a additive model (linear part + spline part).
Using gam() {mgcv} i got estimated degrees of freedom(edf) for the smoothing
splines. Now I want to use the functional form of my model
2010 Feb 04
3
mgcv problem
Dear friends,
I have install the last version 2.10 and now I have probles with 'mgcv' which can be load. I proved to eliminated and reinstalled but always obtain the same message:
> library (mgcv)
This is mgcv 1.6-1. For overview type `help("mgcv-package")'.
Error in runif(1) :
.Random.seed is not an integer vector but of type 'list'
Error : .onAttach non
2009 Apr 23
1
iteration limit error in gamm and notExp2
hi,
I am trying to run a mixed effect gam using gamm (mgcv)
and I get the following error:
"Error in lme.formula(y ~ X - 1, random = rand, data = strip.offset(mf), : nlminb problem, convergence error code = 1
message = iteration limit reached without convergence (9)"
I've read all about 'notExp2' but since I am not an expert I didn't understand that much. I was
2007 Dec 26
1
Cubic splines in package "mgcv"
R-users
E-mail: r-help@r-project.org
My understanding is that package "mgcv" is based on
"Generalized Additive Models: An Introduction with R (by Simon N. Wood)".
On the page 126 of this book, eq(3.4) looks a quartic equation with respect
to
"x", not a cubic equation. I am wondering if all routines which uses
cubic splines in mgcv are based on this quartic
2006 Jun 20
1
Comparing partial response curves from GAM
Hello all, I was wondering if anyone is aware of formal approaches and tools
for comparing partial response curves produced in GAM? My interest is in
determining if two partial response curves are "statistically" different. I
recognize that point-wise standard error estimates can be produced using the
GAM package but Im not certain how to translate this into a statistical test
for the