search for: corspher

Displaying 14 results from an estimated 14 matches for "corspher".

2008 Nov 19
2
GAMM and anove.lme question
...accurate)? The data include hydroacoustic estimates of fish biomass (lbloat) in 1,000 meter long intervals (elementary sampling units) from multiple transects (each 20-30 km long, tranf) in two different lakes and three different years. bloat.gamm1 <- gamm(lbloat ~ s(depth), correlation=corSpher(c(30000, 0.01),form = ~ x+y|tranf, nugget=TRUE), data=fish3) bloat.gamm2 <- gamm(lbloat ~ lakef + s(depth), correlation=corSpher(c(30000, 0.01),form = ~ x+y|tranf, nugget=TRUE), data=fish3) bloat.gamm3 <- gamm(lbloat ~ lakef + s(depth, by=lakef), correlation=corSpher(c(30000, 0.01),fo...
2005 Jul 13
3
nlme, MASS and geoRglm for spatial autocorrelation?
...a reasonably basic analysis of some spatial presence/absence data but am somewhat overwhelmed by the options available and could do with a helpful pointer. My researches so far indicate that if my data were normal, I would simply use gls() (in nlme) and one of the various corSpatial functions (eg. corSpher() to be analagous to similar analysis in SAS) with form = ~ x+y (and a nugget if appropriate). However, my data are binomial, so I need a different approach. Using various packages I could define a mixed model (eg using glmmPQL() in MASS) with similar correlation structure, but I seem to need to de...
2012 Oct 01
6
nlme: spatial autocorrelation on a sphere
...ere (the Earth) for which I would like to run an gls model assuming that the errors are autcorrelated, i.e. including a corSpatial correlation in the model specification. In this case the distance metric should be calculated on the sphere, therefore metric = "euclidean" in (for example) corSpher would be incorrect. I would be grateful for help on how to write a new distance metric for the corSpatial function. I believe there are several ways that distances on a sphere can be calculated in R, for example the "distMeeus" function in the geosphere library. However, I have no idea h...
2006 Nov 23
1
lme function
Hello. As advised by Mick Crawley in his book on S+, I'm trying to use the lme function to examine a linear relationship between two variables measured at 60 locations in 12 sites, while taking account of any spatial autocorrelation (i.e. similarity in variation between the two variables that is due to site). I am using the function as follows:
2008 Apr 29
2
Variogram problem
...in a chart of the distribution of precipitations/temperatures in Europe starting from 73 different stations (and, of course, distributed irregularly on the chart, where use of the krigeage). Here, I carried out this to test to obtain semivariogram spherical by groping: x<-ts(rnorm(73)) cs1<-corSpher(form=~x) y<-Variogram(cs1,2628) #2628 corresponding to the " distance" described in l' helps, that is to say the number of station* (the number of station -1) /2. But there does not go it misses apparently much d' information. Having begun under R for approximately one month...
2012 Oct 10
1
glmmPQL and spatial correlation
...s), the calculatations go on forever. I was running the first model for over a week and was still not getting past the first iteration. This is the model I used M1.f.Spa <- glmmPQL(presence ~ sst + tmax100 + tbot + sss + ssu + tmax100d + sbot, random = ~1|fPTT, family = binomial, correlation = corSpher(c(91323.53,0.4279603), form =~ x+y, nugget = TRUE), data = sample.df1) This week, I tried a different approach and split the 70k subset into smaller datasets of 10,000 points, and now the model runs much faster (just a couple of hours tops), Yet the output of these models changes with regards to t...
2008 Nov 15
1
GAMs and GAMMS with correlated acoustic data
...25) ~ lakef +s(depth, by=lakef), data=fish3) #GAMM example: bloat.gamm1 <- gamm(log10(yaobloaterbiom+0.00325) ~ lakef + s(depth, by=lakef), correlation=corAR1(form = ~ interval|tranf), data=fish3) However, GAMM results from models including a wide variety of correlation structures (corExp, CorSpher, CorLin, AR1, ARMA) produce autocorrelated residuals (similar lag range as GAM), patterns in residuals plots, and confidence intervals for predictions that are only slightly large than for GAMs. This suggests to me that GAMM is not performing much better than GAM (or I've not specified mod...
2005 Jul 15
1
nlme and spatially correlated errors
...AMAC ~ CRAS | TRANSECTO) > model4<-lme(GUAMAC ~ CRAS, random = GUAMAC ~ CRAS -1 | TRANSECTO) > AIC(model1,model2,model3,model4) df AIC model1 3 3730.537 model2 4 3698.849 model3 6 3702.408 model4 4 3704.722 > plot(Variogram(model2, form = ~ X + Y)) > model5<-update(model2,corr=corSpher(c(30,0.8), form = ~ X + Y, nugget = T)) > plot(Variogram(modelo7, resType = "n")) > summary(model5) In this case I obtain new F for the independent variable INSOLACION, new R2 for the whole model and new parameters for the linear model. I have also applied this procedure to pol...
2005 May 17
0
problem with gls : combining weights and correlation structure
...e you will have time to read me 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...
2007 Jan 15
0
spatial correlaton in lme and gls
...d symmetry to capture the correlation within stations. My question is.....I have x and y coordinates for each station (the subsamples have nearly the same coordinates)...how do you include a spatial correlation structure between stations? I tried things like: tmp<-gls(y~z,correlation=corSpher(form=~xcoord+ycoord| Station)) but this is modelling the within-station correlation. I want to include between station correlation as some stations are close in space, and others are not. Station is the highest level (it is just 2-way data). Is this possible? The examples in the literat...
2010 Jan 23
1
(nlme, lme, glmmML, or glmmPQL)mixed effect models with large spatial data sets
Hi, I have a spatial data set with many observations (~50,000) and would like to keep as much data as possible. There is spatial dependence, so I am attempting a mixed model in R with a spherical variogram defining the correlation as a function of distance between points. I have tried nlme, lme, glmmML, and glmmPQL. In all case the matrix needed (seems to be (N^2)/2 - N) is too large for my
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
...cal), data = Joy) m1.nlme<-nlme(m0) m3.nlme<-update(m1.nlme,random=(asym~1), weights = varPower() ) m4.nlme <- update( m3.nlme, corr = corExp(form = ~ 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=F...
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