search for: par3

Displaying 12 results from an estimated 12 matches for "par3".

Did you mean: par
2009 Dec 29
2
pass functions and arguments to function
Hi, I wonder how to pass several functions and their arguments as arguments to a function. For example, the main function is f = function(X ) { process1(X) ... process2(X) } I have a few functions that operate on X, e.g. g1(X, par1), g2(X, par2), g3(X, par3). par1, par2 and par3 are parameters and of different types. I would like to pass g1, g2, g3 and their arguments to f and g1, g2, g3 may appear to be in different orders. So that final effect of the passing is f = function(X ) { process1(X) g1(X, par1) g2(X, par2) g3(X, par3) proc...
2009 Jun 16
1
Constrained Optimization, a full example
...run this (as a script from a file). I thought that theta would contain the fitted parameters. The goal here is to find the least squares fit according to the function defined as "rss" subject to the constraints defined as ui and ci. I defined ui and ci to (hopefully) force par2 and par3 into the range 0.0 <= par2 <= 1.0 and 0.0 <= par3 <= 1.0. I am not at all sure that ui and ci are defined correctly. The call to constrOptim returns normally, but without a solution (apparently). Any suggestions appreciated. Thanks Stu # data y <- c(0.111111111111111...
2009 Dec 29
1
(no subject)
Hi, I wonder how to pass several functions and their arguments as arguments to a function. For example, the main function is f = function(X ) { process(X) ... process(X) } I have a few functions that operate on X, e.g. g1(X, par1), g2(X, par2), g3(X, par3). par1, par2 and par3 are parameters and of different types.
2009 May 20
1
SEM:Standard error of std.coef estimates?
...andard error of the standardized path coefficients as well? Thanks, Bastiaan PS: When I use std.coef, all I get is this: std.coef(path.model.SSI4) Std. Estimate par1 par1 0.39499 com_veg <--- tempm par2 par2 0.35231 SNutBili <--- tempm par3 par3 -0.68170 S_SSI4 <--- tempm par4 par4 -0.39145 com_veg <--- Wdeficit par5 par5 -0.60025 SNutBili <--- Wdeficit par6 par6 -0.20562 S_SSI4 <--- Wdeficit par7 par7 0.14871 SNutBili <--- com_veg par8 par8 0.14905 S_SSI4 <--- com_veg par9...
2011 Feb 04
2
vegan and sweave using xtable
Dear all, Using: library(vegan) data(BCI) mod <- radfit(BCI[1,]) mod RAD models, family poisson No. of species 93, total abundance 448 par1 par2 par3 Deviance AIC BIC Null 39.5261 315.4362 315.4362 Preemption 0.042797 21.8939 299.8041 302.3367 Lognormal 1.0687 1.0186 25.1528 305.0629 310.1281 Zipf 0.11033 -0.74705 61.0465 340.9567 346.0219 Mandelbrot 10...
2006 Feb 08
1
expand.grid without expanding
Dear list, I've recently came across a problem that I think I've solved and that I wanted to share with you for two reasons: - Maybe others come across the same problem. - Maybe someone has a much simpler solution that wants to share with me ;-) The problem is as follows: expand.grid() allows you to generate a data.frame with all combinations of a set of values, e.g.: >
2009 Jun 17
0
Curve fit a nonlinear equation with box constraints: success, many thanks!
...32258,0.0608108108108108 ,0.0128205128205128,0.0136078431372549) x1 <- c(0,0.978723404255319,0.087378640776699,0.549295774647887,0.0596026490066225 ,0.61578947368421) x2 <- c(1,3,4,5,6,7) x3 <- c(3600,169200,185400,255600,271800,342000) par1 <- par[1] par2 <- par[2] par3 <- par[3] ressq <- (y - par1 * (x1 + 1) * x2^(-par2) * x3^par3)^2 sum(ressq) } #call to optimizer opti <- optim(c(0.5, 0.5, 0.1), rss, gr = NULL, method = "L-BFGS-B", lower = c(-Inf, 0, 0), upper = c(Inf, 1, 1) ) # ***** End script file ********* [[alternativ...
2012 Feb 13
0
Error from GNLS (undefined columns selected)
...ector of fitted values): V0V1V2V3 V4 V5 0.56374863838.6875400.1041095890.0572495640 1.47392252639.125400.2767123290.0553929370 0.51704068441.0625450.1808219180.0532145910 1.38181318737.5625400.3534246580.0505213210 and this is my call of gnls: fm1 <- gnls(V0 ~ mymodel(V1,V2,V3,V4,V5,par1,par2,par3,par4,par5,par6,par7,par8), data=input,start=list(par1=0.2,par2=0.4,par3=0.8,par4=0.2,par5=10,par6=0.8,par7=0.9,par8=-0.5)) and I get the following error: Error in `[.data.frame`(eval(model, data.frame(data, getParsGnls(plist,  :    undefined columns selected  My guess is that R is not able to cr...
2005 Mar 02
1
Rounding parameter values in genoud(), Rgenoud package
...hat the function is generating many parameter sets that are identical after rounding. Can I impose rounding on the function and thereby lessen processing time? The only function argument that seems related is the solution.tolerance, but this is not for the parameter values. Run par1 par2 par3 par4 par5 par6 Bias MAE R2 E2 E1' 507 0.0239 0.0219 0.0267 0.0274 0.0283 0.0245 -0.0112 0.0804 0.9994 0.9994 0.9792 508 0.0239 0.0219 0.0267 0.0274 0.0283 0.0245 -0.0112 0.0804 0.9994 0.9994 0.9792 509 0.0239 0.0219 0.0267 0.0274 0.0283 0.0245 -0.0112 0.0804 0.9994...
2010 Dec 17
2
rgl: coordinating and saving viewpoints, zoom, scale for multiple images
...so that one could flip back/forth among graphs and see only the relevant differences. In 2D, all this usually requires is setting the same xlim, ylim and other constant aspects across multiple graphs. In 3D with rgl, I can do one graph, rotate, zoom, etc. by hand and capture the viewpoint with par3d("userMatrix"), but I can't figure out how to save the zoom and scale values to reproduce that viewpoint in another graph, in a way I could feed to view3d or rgl.viewpoint and get an equivalent view of the new data/model. An example follows, but I don't know how to capture in c...
2012 Jun 06
1
error calling Winbugs using R2WinBugs to run a multi-level model
...dat8") bugs.data(sp.data, digits=5, data.file="dir1\\data1.txt") # test the model runs fit = bugs(data=paste("C:\\Users\\User1\\Documents\\dir1\\data1.txt",dataFile,sep=""), inits=NULL, parameters.to.save=list('par1','par2','par3'), model.file=modelFile, debug=TRUE, n.chains=3, n.iter=20, n.burnin=3, n.thin=1, digits=4) ## The trap incompatible copy BugsScript.Action.Do [00000436H] .a BugsScript.Action [025B6790H] .argNum INTEGER 0 .bugsCommands ARRAY 240 OF CHAR 7877X, 75A5X, 0B17X,...
2009 Jun 29
5
Help
Hi group, I found a module for adaptive kernel density estimation for Stata users, but unfortunetly I don't have access to Stata, can I find a similar approach using R? Thank u so much 4 ur time. [[alternative HTML version deleted]]