Displaying 20 results from an estimated 5000 matches similar to: "gls and memory allocation"
2008 Feb 25
0
logLik calculation in gls (nlme)
I'm getting some odd results computing log-likelihoods
with gls using splines with increasing degrees of freedom --
the deviance *increases* substantially with increasing df.
(Since spline models with increasing df aren't nested, it
need not decline monotonically but I would expect it to
have a decreasing trend!)
I may just be confused, but I *think* the issue is somewhere
within the
2004 Jan 14
2
Generalized least squares using "gnls" function
Hi:
I have data from an assay in the form of two vectors, one is response
and the other is a predictor. When I attempt to fit a 5 parameter
logistic model with "nls", I get converged parameter estimates. I also
get the same answers with "gnls" without specifying the "weights"
argument.
However, when I attempt to use the "gnls" function and try to
2008 Sep 03
1
Non-constant variance and non-Gaussian errors
Hi Paul,
Take a look at gam() from package mgcv (gam = generalized additive models), maybe this will help you. GAMs can work with other distributions as well. Generalized additive models consist of a random component, an additive component, and a link function relating these two components. The response Y, the random component, is assumed to have a density in the exponential family. I am not sure
2007 Oct 17
2
nmle: gnls freezes on difficult case
Hi,
I am not sure this is a bug but I can repeat it, The functions and data
are below.
I know this is nasty data, and it is very questionable whether a 4pl
model
is appropriate, but it is data fed to an automated tool and I would
have hoped for an error. Does this repeat for anyone else?
My details:
> version
_
platform i686-pc-linux-gnu
2009 Jun 17
1
loop help
Hi all,
I'm stuck trying to get syntax correct for the follwing type of loop.
I would like to find the column with the largest value in a given row,
and create a new column with a categorical variable indicating which
column the highest value of "i" comes from.
too=data.frame(A=rnorm(10,1),B=rnorm(10,2),C=rnorm(10,1.5))
too$large=0
too$large=for (i in 1:length(too[,c(1,2,3)]))
2009 Jan 07
1
Extracting degrees of freedom from a gnls object
Dear all,
How can I extract the total and residual d.f. from a gnls object?
I have tried str(summary(gnls.model)) and str(gnls.model) as well as gnls(), but couldn?t find the
entry in the resulting lists.
Many thanks!
Best wishes
Christoph
--
Dr. rer.nat. Christoph Scherber
University of Goettingen
DNPW, Agroecology
Waldweg 26
D-37073 Goettingen
Germany
phone +49 (0)551 39 8807
fax +49
2003 Oct 31
0
strange logLik results in gls (nlme)
I am trying to analyse a data with gls/lm using the following set of models
prcn.0.lm <- lm( log10(Y)~(cond-1)+(cond-1):t ,prcn)
prcn.1.gls <- gls( log10(Y)~(cond-1)+(cond-1):t ,prcn,cor=corAR1())
prcn.0.gls <- gls( log10(Y)~(cond-1)+(cond-1):t ,prcn)
prcn.1m.gls <- gls( log10(Y)~(cond-1)+(cond-1):t ,prcn,cor=corAR1(),method="ML")
I get the following AICs for these models:
2004 Sep 03
0
ML vs. REML with gls()
Hello listmembers,
I've been thinking of using gls in the nlme package to test for serial
correlation in my data set. I've simulated a sample data set and have
found a large discrepancy in the results I get when using the default
method REML vs. ML.
The data set involves a response that is measured twice a day (once for
each level of a treatment factor). In my simulated data set, I
2020 Oct 28
0
nlme: New variance function structure varConstProp
Dear R developers,
recently I have written a wishlist bug report for nlme containing a patch that
adds the variance function structure
s2(v) = t1^2 + t2^2*v^2
where v denotes the variance covariate, s2(v) denotes the variance function
evaluated at v, and t, t1 and t2 are the variance function coefficients. The
covariate can also be the fitted response.
The idea that the residual variance
2009 May 08
2
partial mantel tests "Ecodist"
Hi all,
I'm searching for a little clarification on partial mantel tests
(ecodist package)
I've a distance matrix (x,y), and several others containing
environmental/chemical variables.
Based on the help file, and the package instructions I've managed to
implement the tests as;
var1 ~ env1 + space
to partial out the effect of space and test the relationship between
the
2010 Jul 08
0
Psudeo R^2 (or other effect size) in spatial gls regressions
Dear all,
I have been using the function gls in the package nlme in R to fit some spatial
regressions (as described in Dormann et al.). However, I have been struggling
trying to find a way to calculate a measure of effect size from these models, so
I wanted to know if any of you had an idea on how to do this.
More precisely, I am producing a multiple model with an exponential correlation
2002 Apr 14
0
gls
Dear all, I am confused.
I have encountered some strange behaviour of gls
> data(co2)
> co2.y <- aggregate(co2,1,mean)
> co2.y.data <- data.frame(co2=as.numeric(co2.y),year=seq(1959-1980,along=co2.y))
> co2.1.gls <- gls(co2~year+I(year^2), co2.y.data)
> co2.2.gls <- update(CO2.1.gls, corr=corAR1())
> summary(CO2.2.gls)
> plot(CO2.2.gls)
plot shows standardized
2011 Nov 22
0
Error in gls function in loop structure
Hi, r-users
I got a problem when I try to call a *gls* function in loop structure.
The gls function seems not able to recognize the parameters that I pass
into the loop function!
(But, if I use lm function, it works.)
The code looks like this:
=================================================
gls.lm <- function(Data, iv1, dv1)
{
gls.model <- gls(Data[ , dv1] ~ Data[ , iv1], correlation =
2009 Mar 04
0
'anova.gls' in 'nlme' (PR#13567)
There is a bug in 'anova.gls' in the 'nlme' package (3.1-90). The=20
bug is triggered by calling the function with a single 'gls' object=20
and specifying the 'Terms' argument but not the 'L' argument:
> library(nlme)
> fm1Orth.gls <- gls(distance ~ Sex * I(age - 11), Orthodont,
+ correlation =3D corSymm(form =3D ~ 1 |
2011 Dec 12
0
Confidence intervals of gls function?
Dear gls-experts,
while reading and testing some examples of the book
"introductionary time series analysis with R",
I encountered the following fact which puzzles me.
Confidence intervals for global temperature time series (P99)
computed from general least squares (GLS) to fit the time series.
I repeat the example from the book and get the same results:
temp.gls=gls(temp ~
2006 Aug 09
1
Joint confidence intervals for GLS models?
Dear All,
I would like to be able to estimate confidence intervals for a linear
combination of coefficients for a GLS model. I am familiar with John
Foxton's helpful paper on Time Series Regression and Generalised Least
Squares (GLS) and have learnt a bit about the gls function.
I have downloaded the gmodels package so I can use the estimable
function. The estimable function is very
2005 Feb 02
0
Not reproducing GLS estimates
Dear List:
I am having some trouble reproducing some GLS estimates using matrix
operations that I am not having with other R procedures. Here are some
sample data to see what I am doing along with all code:
mu<-c(100,150,200,250)
Sigma<-matrix(c(400,80,16,3.2,80,400,80,16,16,80,400,80,3.2,16,80,400),n
c=4)
sample.size<-100
temp <-
2012 Apr 19
2
Gls function in rms package
Dear R-help,
I don't understand why Gls gives me an error when trying to fit a
model with AR(2) errors, while gls (from nlme) does not. For example:
library(nlme)
library(rms)
set.seed(1)
d <- data.frame(x = rnorm(50), y = rnorm(50))
gls(y ~ x, data=d, correlation = corARMA(p=2)) #This works
Gls(y ~ x, data=d, correlation = corARMA(p=2)) # Gives error
# Error in
2003 Sep 25
1
Error from gls call (package nlme)
Hi
I have a huge array with series of data. For each cell in the array I
fit a linear model, either using lm() or gls()
with lm() there is no problem, but with gls() I get an error:
Error in glsEstimate(glsSt, control = glsEstControl) :
computed gls fit is singular, rank 2
as soon as there are data like this:
> y1 <- c(0,0,0,0)
> x1 <- c(0,1,1.3,0)
> gls(y1~x1)
2003 Jul 21
0
correlated residuals in gls: Coefficient matrix not invertible
Dear Rers,
I have threes series, x, y, z and I want to fit a model z ~ x + y. First of
all, I fit a lm. I found the residuals are correlated, by looking at the
acf() and pacf(). Then I tried to fit a gls model allowing residuals to be
correlated (correlation = corARMA(p=5, q=1)):
y.na <- as.data.frame(y[complete.cases(y),])
y.gls <- gls(z ~ x + y, data = y.na, correlation=corARMA(p=5,