search for: corgaus

Displaying 17 results from an estimated 17 matches for "corgaus".

Did you mean: cargas
2006 Jul 18
2
Using corStruct in nlme
I am having trouble fitting correlation structures within nlme. I would like to fit corCAR1, corGaus and corExp correlation structures to my data. I either get the error "step halving reduced below minimum in pnls step" or alternatively R crashes. My dataset is similar to the CO2 example in the nlme package. The one major difference is that in my case the 'conc' steps are no...
2011 Feb 18
0
Variogram (nlme) of a lme object - corSpatial element question
...r Users, >From previous analysis (semi-variograms using package gstat), I found spatial autocorrelation in my dataset. The best fitted model to this spatial correlation structure is the Gaussian model (Spherical, Exponential, Linear tested and comparison done by Sum of Square errors). So I used corGaus function to define this spatial autocorrelation in my lme model using the option "correlation". The Variogram function (package nlme) used on a lme object calculates the semi-variogram for the within-group residuals and add the semi-variogram of the corSpatial element (corGaus in my case...
2007 Mar 13
0
segfault with correlation structures in nlme
...=pdDiag(A+B+w~1), start = c(fixef(fm50var.lme),1)) >plot(ACF(fm10var.nlme,maxLag=10),alpha=.05) >fm20var.nlme <- update(fm10var.nlme,corr=corAR1(0.311)) >fm30var.nlme <- update(fm10var.nlme,corr=corARMA(p=0,q=2)) >fm60var.nlme <- update(fm10var.nlme,corr=corGaus(form=~Time)) *** caught segfault *** address 0x1075e501, cause 'memory not mapped' Traceback: 1: eval(expr, envir, enclos) 2: eval(modelExpression, env) 3: assign("modelValue", eval(modelExpression, env), envir = thisEnv) 4: function (newPars) { if (!missing(newPars)) {...
2012 Aug 17
0
spatial auto-correlation structure in nlme
Dear R users, I'm estimating a mixed effects model in which the spatial correlation is controlled for by the "corGaus" structure. I'm wondering if there is a document or paper that explains how the spatial correlation structure (such as "corExp" or "corGaus") works. Let me use the example and data posted on UCLA's R FAQ webpage to explain my problems. The link for the webpage is:...
2009 Nov 22
0
glmmPQL random effects model
.... All observations belong to cluster 1. The data is to be modelled without fixed effects, i.e., a by a zero-mean random effects model. Additionally, the model is to be fed with a correlation structure (to avoid double entries, a column x<-rnorm(nrow(data1),0,0.000001) is appended): correlation=corGaus(form=~covariate1 + covariate2 + ... +covariateM + x, nugget=FALSE) The data is visible to glmmPQL: attach(data1) Is glmmPQLm<-glmmPQL(target~0,random=~1|cluster, data=data1, correlation=corGaus(form=~covariate1 + covariate2 + ... +covariateM + x, nugget=FALSE), family="binomial") th...
2011 Jul 11
1
GLS - Plotting Graphs with 95% conf interval
...e predict function. I want to add SE to the graph, but not sure how to get them out as the predict function for gls does not appear to allow for SE=TRUE argument. Here is my code so far: f1<-formula(MaxNASC40_50~hu3+flcmax+TidalFlag) vf1Exp<-varExp(form=~hu3) B1D<-gls(f1,correlation=corGaus(form=Lat~Lon, nugget=TRUE),weights=vf1Exp , data=ocean) ochu3<-seq(from=2.9,to=4,length=120) ocflc<-seq(from=0,to=0.8,length=120) tidal1<-rep(c("1"),length=120) mydata1<-data.frame(TidalFlag=factor(tidal1),hu3=ochu3,flcmax=ocflc) lineNASC1<-predict(B1D,newdata=mydata1,typ...
2005 May 17
0
problem with gls : combining weights and correlation structure
...and I will try to be brief. I am also sorry for my poor english. I used gls function from the package nlme to correct two types of bias in my database. At first, because my replicates are spatially aggregated, I would like to fit a corStruct function like corLin, corSpher, corRatio, corExp or corGaus in my gls model, and simultaneously, because my response variable is an estimate, I would like to use weights to take into account the accuracy of the estimation. I used a varFixed object corresponding to squared standard error. Variograms all shows a weak but real spatial autocorrelation (nugge...
2008 Oct 18
0
extracting residual variance from glmmPQL
...in order to compute the distribution of a summary statistics. My data are binomial and I have a correlation term in my model. My model is structured in the following way m <- glmmPQL( fixed = cbind(sucess,failure) ~ x1 + x2 + ... , random = ~ 1 | bidon, correlation = corGaus(form=~ longitude + latitude), family = binomial) My simulation model would be something like #the success probability y <- rmvnorm(1,predict(m),var.covar.matrix) #the binomial sampling k <- rbinom(length(y),size=n,prob=y) In order to run these simulations, therefore, I ne...
2011 Apr 06
1
corSpatial and nlme
I noticed that ?corClasses in package nlme does not list corSpatial among the standard classes. This might either be intentional because corSpatial is not "standard" , or it might be simply an oversight that needs correcting. ------------------------------------------ Robert W. Baer, Ph.D. Professor of Physiology Kirksville College of Osteopathic Medicine A. T. Still University of
2011 Jun 20
0
R crashes with 'nlme' and corStruct
...orm = ~ mtime) ) # R crashes m5.nlme <- update( m3.nlme, corr = corRatio(form = ~ mtime) ) # R crashes m6.nlme <- update( m3.nlme, corr = corSpher(form = ~ mtime) ) # R crashes m7.nlme <- update( m3.nlme, corr = corLin(form = ~ mtime) ) # R crashes m8.nlme <- update( m3.nlme, corr = corGaus(form = ~ mtime) ) # R crashes *sessionInfo():* R version 2.13.0 (2011-04-13) Platform: i386-pc-mingw32/i386 (32-bit) locale: [1] LC_COLLATE=French_France.1252 LC_CTYPE=French_France.1252 LC_MONETARY=French_France.1252 LC_NUMERIC=C LC_TIME=French_France.1252 attached base packages: [1] grDevi...
2011 Jun 22
0
GLS models and variance explained
Dear list, Inspecting residuals of my linear models, I detected spatial autocorrelation. In order to take this into account, I decided to use the GLS method with the correlation = corGaus ( ~ X + Y). Then, I can sort my GLS models based on their AIC. But ... how to know the proportion of the variance explained by the best one (it can be best of the worst models) ? R-squared value has not the same meaning for OLS and GLS ... - Could the R2 value calculated with the OLS model (usin...
2005 Jan 01
1
lme: Variances
...the (measurement) error So lme must have estimated three variance parameters plus the parameter for the Gaussian correlations. From the output I get, I dont know which is which. The output was: > nepal.lme<-lme(ht~sex+died+alive+mage+lit+bf+age+I(age^2), data=nepal,random=~1|id,correlation=corGaus(corstruct,form=~age|id) ,na.action=na.exclude) > summary(nepal.lme) Linear mixed-effects model fit by REML Data: nepal AIC BIC logLik 3363.547 3420.7 -1669.774 Random effects: Formula: ~1 | id (Intercept) Residual StdDev: 4.240752 1.240242 Correlation Structure: G...
2009 Jul 25
1
how to avoid a for looping break after an error message
...) x<-sort(x) colnames(coord)<-c("X","Y") y=(1+0.8*x)+runif(n,-(n*3),(n*3)) x2<-rep(x,each=nn)+rnorm(n*nn,0,2) y2<-rep(y,each=nn)+rnorm(n*nn,0,2) coord2<-cbind(rep(coord[,1],each=nn)+rnorm(n*nn),rep(1,n*nn)) gls<- gls(y2 ~ x2,correlation=corGaus(form=~coord2[,1]+coord2[,2])) print(i) } -- Victor Lemes Landeiro Instituto Nacional de Pesquisas da Amazônia - INPA - CPEc (Ecologia) Av. André Araujo, 2936, Petrópolis CEP: 69067-375 Manaus, Amazonas, Brasil Telefones: INPA (92) 3643 1912 Casa (92) 3646 3942 ou 3304 3942 Celular (92) 88311121 ww...
2009 Jan 22
1
convergence problem gamm / lme
...and we normalized the explanatory variables. We also changed several settings (see models below). Interestingly, we do manage to fit a more complex model: gamm2<-gamm(count~offset(offsetter)+ s(lat,lon,year,dayofyear), random=list(code_tripnr=~1),family="poisson", correlation = corGaus(0.1, form=~lat + lon)) The models are fitted using mgcv 1.4-1 and R 2.7.1 on a 64Bits Debian OS. So there seems to be a convergence problem, correct? And does someone have an idea what might cause this? Secondly are there some tricks/solutions. E.g. perhaps we could use the results from th...
2005 May 25
1
question: corCAR1 in lme
Hello all, I am trying to use lme to examine how a response variable (Chla) changes over time in different treatments (2 Temp & 2 Light levels). Within each treatment combination, there are two replicate tanks (each with unique TankID) with coral fragments in them. All tanks are subject to the same environment until Time=0, when treatments are imposed, and Chla is measured for each
2012 May 02
3
Consulta gráfica
  Hola,   Por favor, ¿podríais indicarme qué recursos (librerías o ideas) pueden resultar de utilidad para crear un gráfico del estilo del de la figura 3.8 del siguiente link?   http://www.tsc.uvigo.es/BIO/Bioing/ChrLDoc3.html#3.5   Actualmente estoy utilizando funciones muy básicas y la verdad es que no me encuentro muy satisfecha con el resultado.   Muchas gracias.   Eva [[alternative HTML
2009 Jan 28
2
t.test in a loop
Hi All, I've been having a little trouble with creating a loop that will run a a series of t.tests for inspection, Below is the code i've tried, and some checks i've looked at. I've used the get(paste()) idea as i was told previously that the use of the eval should try and be avoided. I've run a single syntax to check that my systax is correct and works without any problems