similar to: How to optimize function parameters?

Displaying 20 results from an estimated 1000 matches similar to: "How to optimize function parameters?"

2011 Feb 25
5
Substituting inside expression
I am having following problem: I?m constructing model for calculation of area of triangle. I know sides a, b, and gamma angle. I wish to calculate the area using heron?s formula: S <- sqrt(s*(s-a)*(s-b)*(s-c)) where s <- (a+b+c)/2 and c is calculated using law of cosines: c <- sqrt(a^2 + b^2 -2*a*b*cos(gamma)) since i am calculating a regression model, i need derivation of this
2011 Feb 28
3
Incorrectness of mean()
I have found following problem: I have a vector: > a <- c(1.04,1.04,1.05,1.04,1.04) I want a mean of this vector: > mean(a) [1] 1.042 which is correct, but: > mean(1.04,1.04,1.05,1.04,1.04) [1] 1.04 gives an incorrect value. how is this possible? thanks, zbynek -- View this message in context: http://r.789695.n4.nabble.com/Incorrectness-of-mean-tp3327701p3327701.html Sent from the R
2010 Sep 03
1
How to use lm() output for systemfit() 'Seemingly unrelated regression'
I am having problem using output of lm() function for further analysing using systemfit package. Basicaly, the problem s following - I generate several formulas using lm() > fo1 <- lm(r98[,2] ~ f98[,1] + f98[,2] + ... + f98[,43]) > fo2 <- lm(r98[,1] ~ f98[,1] + f98[,2] + ... + f98[,43]) and than I want to estimate a general model using package systemfit. > fitsur <-
2010 Dec 16
2
How can I draw a line in empirical distribution function?
I've got the graphic with this: a=c(120,40,75,85,55,75,55,90,90,55,155) plot(ecdf(a)) How can I draw lines to show the lower quatile and upper quartil? I only know there is the argument lines(), but I don't know how to use it -- View this message in context: http://r.789695.n4.nabble.com/How-can-I-draw-a-line-in-empirical-distribution-function-tp3090675p3090675.html Sent from the R
2005 Nov 08
2
Variogram
Dear All, Is there anybody has the experience in using variogram(gstat) ? Please kindly give me some hints about the results. I used variogram() to build a semivariogram plot as: tr.var=variogram(Incr~1,loc=~X+Y,data=TRI2TU,width=5) then fir the variogram to get the parameters as: v.fit = fit.variogram(tr.var,vgm(0.5,"Exp",300,1)) v.fit model psill range 1 Nug 1.484879
2004 Feb 18
2
using names() as a variable in a formula
Greetings List, I'm having some trouble with the use of the names function in a formula. Below is an example of something that works (i.e first line), and the second line is the same formula which doesn't. I want to be able to reference the column of the dataC table so I can run the variogram iteratively with a loop. > v<-variogram(A1~1,loc=~x+y, dataC) >
2008 Aug 05
4
LIDAR Problem in R (THANKS for HELP)
Hi All, I am a PhD student in forestry science and I am working with LiDAR data set (huge data set). I am a brand-new in R and geostatistic (SORRY, my background it?s in forestry) but I wish improve my skill for improve myself. I wish to develop a methodology to processing a large data-set of points (typical in LiDAR) but there is a problem with memory. I had created a subsample data-base but
2003 Oct 02
1
Are package maintainers responsible for name-mangling class names?
The following came up when Roger Bivand and I discussed R's name spaces and overlap in packages, in the bus to the field trip during StatGIS, last Tuesday: If two packages create the same class, say "variogram", and both are loaded, then using a method for an object of class "variogram" cannot discriminate between them and will call the method in the package loaded last.
2006 Mar 13
2
Error Message from Variogram.lme Example
When I try to run the example from Variogram with an lme object, I get an error (although summary works): R : Copyright 2005, The R Foundation for Statistical Computing Version 2.2.1 (2005-12-20 r36812) ISBN 3-900051-07-0 ... > fm1 <- lme(weight ~ Time * Diet, BodyWeight, ~ Time | Rat) Error: couldn't find function "lme" > Variogram(fm1, form = ~ Time | Rat, nint =
2017 Sep 24
1
R version 3.3.2, Windows 10: gstat package: Error in fitting a variogram model using 'fit.variogram' function
Dear Members, I am trying to fit a variogram model using fit.variogram function from the gstat package. The figure showing my experimental variogram can be seen here: https://i.stack.imgur.com/UZXw4.png My code line for this operation is: > c2.vgm.fit<-fit.variogram(c2.vgm.exp,vgm(nugget=0, psill=400,model="Exp",range =40000),fit.method = 7) The system throws following error
2001 Oct 18
1
Sgeostat module
Dear Users, I use Sgeostat to calculate co variogram (function est.variogram with two variables). If i inverse the 2 variables in the functions, the co variogram change! Normaly it is symmetric, isn't it? Someone could me explain why, or give me an idea to calculate co variogram in a easy way... Thanks in advance Laurent ps : sorry for my english Laurent William Dubroca Centre de
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
2009 Mar 09
1
Zero distance error in corSpatial - correlation structure using lme
Hello, I am having a problem specifying the correlation structure in lme which leads to the error: Error in getCovariate.corSpatial(object, data = data) : Cannot have zero distances in "corSpatial". I have specified a grouping variable which is the only fix I could find by searching this error on R-help. ISee the below example. When my samples (tran) - which are transects
2006 Nov 24
2
plot() and Jpeg() increase font size and resolution
Dear list, I am having troubles increasing the fontize when plotting a variogram{gstat} and its model (vgm) with plot and using jpeg(). Also the resolution in the jpeg call does not work. I am using R2.4 on Mandriva 10.2 linux. I can change fontsize with cex.axis in a normal plot, so I presume it has to do with plotting the variogram model. Any help on how to increase the font size and
2002 Aug 06
2
Memory leak in R v1.5.1?
Hi, I am trying to minimize a rather complex function of 5 parameters with gafit and nlm. Besides some problems with both optimization algorithms (with respect to consistantly generating similar results), I tried to run this optimization about a hundred times for yet two other parameters. Unfortunately, as the log below shows, during that batch process R starts to eat up all my RAM,
2015 Aug 04
2
Duda interpolación (package ' gstat ')
Hola, # Hacemos el KED. Ver función "krige()": KED.rad <- krige( formula=pluvPcp~layer, # covariable -> radar locations=lluvia.rad.pluv.spdf, newdata=radarGrid, # podría ser cualquier objeto Spatial model=v.fit, # modelo de semivariograma. maxdist=Inf
2003 Mar 07
1
REML option in gstat
Hi, please help!! I've been trying to fit variogram models using the REML method in the gstat package. Every time the Windows GUI crashes. For example library(gstat) data(meuse) x <- variogram(zinc ~ 1, ~x + y, meuse) v <- vgm(140000, "Sph", 800, nug = 10000) plot(x, model = fit.variogram(x, model = v, fit.method=5)) Other fit methods are non problematic (eg. fit.method=7
2008 Apr 29
2
Variogram problem
Hello, I'm french and I have some difficulties in carry out the semiones under R with an aim to carry out an interpolation by krigeage. My goal is to obtain 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
2005 Nov 09
2
Variograms and large distances
Hello R list, I need to compute empirical variograms using data from a large geographic area (~10^6 km2). Although I could not find a specific reference, I assume that both geoR and gstat calculate distances among data points assuming points are on a flat surface (using the Pythagorean Theorem). Because the location of my data is large and located near the pole, assuming that latitude and
2009 Mar 24
1
Variogram with Gstat
Dear all can you help me? i have this problem: i have a dataset in a text file in a matrix of 3 columns: x, y, z where x and y are the coordinates and Z are the mesurements. How can i do a variogram with R?