similar to: implementing a "loop" using by(x,x$factor,FUN)

Displaying 20 results from an estimated 110 matches similar to: "implementing a "loop" using by(x,x$factor,FUN)"

2008 Aug 15
1
Strange error message from geoR´s likfit () lik. max. func.
ComRades: I am geeting the error message Error in ldots[[which(MET)]] : attempt to select less than one element when I try to fit the geostatistical model with the likfit() function of geoR. I have tried with old data for which likfit() successfully maximised the likelihood in previous versions of geoR, and yet the current version fails. I have tried in Windows Vista and Windows XP (I haven't
2006 Jan 13
1
help with gepRglm::likfit.glsm
> -----Original Message----- > From: r-help-bounces at stat.math.ethz.ch [SMTP:r-help-bounces at stat.math.ethz.ch] On Behalf Of ernesto > Sent: Friday, January 13, 2006 9:25 AM > To: Mailing List R > Subject: [R] help with gepRglm::likfit.glsm > > Hi, > > I'm exploring likfit.glsm and I need some help. I have to say that I'm > not an MCMC expert ... >
2011 Mar 25
1
spatial stats - geoR - variogram - standard deviation
Hello, I am attempting to get the standard deviation in multiple distance bins in my spatial data. It appears as though the 'variog' command in the geoR package will do the trick, as one of the outputs from 'variog' is 'variog$sd', which, according to the manual, is the "standard deviation of the values in each bin". However, when I run this command, the
2006 Jun 02
1
geoR, plot of variog4 lines incomplete
I'm using R for Mac OSX version 1.14 (2129) and the geoR package version 1.6-5 (the current version in the R repository). I'm running R in OS 10.4.6 on a Mac G4 iBook (933MHz, 640 MB DDR SDRAM). I searched the R archive and did not find a posting on this issue. I want to use the variog and variog4 functions of geoR to characterize the pattern of spatial autocorrelation of tree
2012 Oct 04
1
geoRglm with factor variable as covariable
Dear R users. I'm trying to fit a generalised linear spatial mode using the geoRglm package. To do so, I'm preparing my data (geodata) as follow: geoData9093 = as.geodata(data9093, coords.col= 17:18, data.col=15,* covar.col=16*) where covar.col is a factor variable (years in this case 90-91-92-93)). Then I run the model as follow: / model.5 = list(cov.pars=c(1,1),
2008 Jul 25
0
Error in vector("double", length)
Please see the code below. When I try to run the variogram - vg.deft<-variog(rd,uvec=10) I keep getting this error- variog: computing omnidirectional variogram Error in vector("double", length) : vector size specified is too large Also, when I try to define distance-based neighborhood - nb.tr=dist.neighbors(tr.locs,2) I get this error - Error in vector("double", length) :
2006 Jan 05
1
Memory limitation in GeoR - Windows or R?
Dear Aaron, I am really a tool user and not a tool maker (actually an ecologist doing some biostatistics)... so, I take the liberty of sending a copy of this e-mail to the r-help list where capable computer persons and true statisticians may provide more relevant information and also to Paulo Ribeiro and Peter Diggle, the authors of geoR.. I really feel that your huge matrix cannot be
2011 Oct 28
0
problem with glsm.krige: trendd and trend l must have similar specifications error
Hello, I used glsm.mcmc and likfit.glsm to create model. Now I want to predict at different locations, but I can't get glsm.krige to work. I keep getting the error that trend.d and trend.l must have similar specifications. I have tried numerous ways to include the covariates in the glsm.krige model, and I keep getting the same error message. The bolded part is the part that doesn't work.
2008 Jun 26
0
geoR : Passing arguments to "optim" when using "likfit"]
Mzabalazo Ngwenya wrote: > Hi everyone ! > > I'm am trying to fit a kriging model to a set of data. When I just run > the "likfit" command I can obtain the results. However when I try to > pass additional arguements to the optimization function "optim" I get > errors. That is I want to obtain the hessian matrix so matrix > (hessian=TRUE). >
2003 Sep 10
1
geoR variogram problem
Dear GeoR-er, If I use the variog function in the latest release of geoR, the first lag is always ignored. For instance, if you read in geodata, calculates the variogram using the variog function and give in a uvec like uvec=seq(0,max,by=2.44), it only starts giving results from distance=4.88 and ignores 2.44! This wasn't the case in former versions of geoR. Is this done on purpose? Why?
2009 Sep 17
0
geoR, variofit
Hello All! I calculate a variogram using the function variog (package geoR) afterwards I use variofit to fit a spherical model (see code below). Now I just changed the units of the variable (in this case MPa to kPa just a factor of 1000). If I do so, I get a different fit and therefore different ranges etc. Why? The semi-variance is of course 6 orders of magnitude higher but the values
2008 Jun 26
0
geoR : Passing arguments to "optim" when using "likfit"
Hi everyone !   I'm am trying to fit a kriging model to a set of data. When I just run the "likfit" command I can obtain the results. However when I try to pass additional arguements to the optimization function "optim" I get errors. That is I want to obtain the hessian matrix so matrix (hessian=TRUE).   Heres a little example( 1-D). Can anyone shed some light?  Where am I
2009 Jan 19
0
Trend.spatial function in geoR
I am having difficulty getting the trend.spatial function in geoR to work properly. After creating a trend.spatial object with a covariate, I try to add the command into my likfit() function as follows: trend1.trend.spatial <- trend.spatial("1st", trend1.geodata) trend1.spatial.EC0.1.reml <- likfit(spatial.geodata, trend1.trend.spatial, ini.cov.pars = spatial.EC0.1.eyefit,
2010 Aug 04
1
geoR - likfit failure
Hi I'm using geoR package to perform linear spatial interpolation(OK). The function likfit() fails to compute REML. The error meassage is : Error in solve.default(v$varcov, xmat); How I can find out that likfit() is failed to process and retrieving the error message ? Thank you so much for your help.
2003 Feb 11
2
geoR question from new R user
Hi, I'm a new R user. My goal is to do a variogram using geoR. I started by trying to do the example in the geoR Illustrative Session using my own data. I am able to read in my Ascii data using: D <- matrix(scan("file.dat", n=530*3), 530,3, byrow=TRUE). Then I use: as.geodata(D, coords.col=1:2, data.col=3) to make the object D geodata. I check the descriptive statistics,
2004 Oct 05
1
Bug in optim - way to solve problem?
Hi, I want to automatically fit variograms to a large number of different sample data sets, and call the funtion "likfit" (in package geoR) from within a for-loop. "likfit" does again call "optim". After ssuccessfully fitting variograms to some of the data sets, the procedure crashes and I get the error message: Error in optim(par = ini, fn = negloglik.GRF,
2011 Apr 12
1
How to set the dimension of a matrix correctly?
Hi all, I use kriging to interpolate the precipitation from stations, but the map of this results show lots of stripes. (please see the attachment)I think there's something wrong with the setting of the dimension of this matrix, however, I have no idea how to know or test to see if this setting is correct or not.I've tried to switch the latitude and longitude, but still got the same
2012 Nov 07
2
pseudo R-squared with likfit (geoR)
We want to compute a pseudo R-squared for a model whose parameter estimation was based on maximum likelihood (function likfit, package geoR). I tried to compute the R2 proposed by Maddala (1983) which compare the maximized likelihood for the model without any predictor and the maximized likelihood for the model with all predictors. I got a really low value (0,01%). Did I miss something? Are
2005 May 17
0
Problem in lme longitudinal model
Hi R-masters! I trying model Heart disease mortality in my country with a lme model like this: m1.lme<-lme(log(rdeath)~age*year,random=~age|year,data=dados) where: rdeath is rate of mortality per 100000 person per age and year age: age of death (22 27 32 37 42 47 52 57 62 67 72 77 82) year: year of death (1980:2002) I don?t have problem to fit the model, but in
2006 Jun 03
1
default value for cutoff in gstat variogram()
I wonder what is the default value for the argument 'cutoff' when not specified in the variogram.formula function of gstat. Computing variogram envelops within gstat, I am comparing the results obtained with variog in geoR and variogram in gstat, and it took me a while before understanding that the cutoff default value is not the maximum distance. Can Edzer tell us about it? All the