search for: spg

Displaying 20 results from an estimated 65 matches for "spg".

Did you mean: seg
2006 May 26
2
combinatorial programming problem
Hola! I am programming a class (S3) "symarray" for storing the results of functions symmetric in its k arguments. Intended use is for association indices for more than two variables, for instance coresistivity against antibiotics. There is one programming problem I haven't solved, making an inverse of the index function indx() --- se code below. It could for instance return the
2012 Oct 11
2
model selection with spg and AIC (or, convert list to fitted model object)
Dear R Help, I have two nested negative log-likelihood functions that I am optimizing with the spg function [BB package]. I would like to perform model selection on these two objective functions using AIC (and possibly anova() too). However, the spg() function returns a list and I need a fitted model object for AIC(), ICtab() [bbmle package], or anova(). How can I perform AIC-based model s...
2009 Feb 02
1
best reference on generics
Hello, All: What would you say is the best succinct reference to cite on use of generic functions, especially S3 generics? I want to add an appropriate citation on this to a forthcoming book in the Springer "useR!" series (discussing the use of the 'fda' package, which uses the S3 standard). Thanks, Spencer Graves
2011 Feb 06
2
Subsampling out of site*abundance matrix
..., 360, 150, 300, 0, 240, 150, 0, 60, 0, 150, 0, 540, 0, 0, 300, 0, 240, 300, 300, 0, 360, 300, 0, 600, 0) abund2 <- matrix(data=abund1, nrow=4, ncol=7) colnames(abund2) <- c("spA", "spB", "spC", "spD", "spa", "spF", "spG") rownames(abund2)<-c("site1", "site2", "site3", "site4") ##### > abund2 spA spB spC spD spa spF spG site1 150 150 150 150 0 300 300 site2 300 300 0 0 300 300 0 site3 0 0 60 540 0 0 600 site4 360 240 0 0 240 360 0 H...
2009 Apr 22
3
Help using spg optimization in BB package
...The only thing am having trouble with is defining the project constraint. I got the upper and lower bounds to work but i am not sure how to create a constraint that the sum of x must be 1. Any help would be greatly appreciated. -- View this message in context: http://www.nabble.com/Help-using-spg-optimization-in-BB-package-tp23175224p23175224.html Sent from the R help mailing list archive at Nabble.com.
2011 May 30
0
definition of meq at spg
For my problem I have #Constraints b11<-0 b21<-0 b12<-0 b22<-0 n1>=0 n2>=0 n1<=1 n1<=1 n1+n2=1 In order to use spg I set Amat<-matrix(rbind(c(rep(0,10)),c(rep(0,10)),c(rep(0,2),1,rep(0,7)), c(rep(0,3),1,rep(0,6)),c(rep(0,10)),c(rep(0,10)), c(rep(0,6),1,rep(0,3)),c(rep(0,7),1,rep(0,2)), c(rep(0,8),1,rep(0,1)),c(rep(0,9),1,rep(0,0)), c(rep(0,8),1,rep(0,1)),c(rep(0,9),1,rep(0,0)), c(rep(0,8),1,1)),ncol=10) b&...
2011 Sep 02
1
Using capture.output within a function
Dear R-users I'm running a maximum likelihood procedure using the spg package. I'd like to save some output produced in each iteration to a file, but if I put the capture.output() within the function I get the following message; Error in spg(par = startval, fn = loglik, gr = NULL, method = 3, lower = lo, : Failure in initial function evaluation!Error in -fn(pa...
2011 Sep 07
1
Imposing Feller condition using project constraint in spg
Dear R-users, I'm running a maximization problem in which I want to impose a condition on the relationship between 2 parameters. The condition is that w[4] = (1+eps)/(2*w[1]), or equivalently w[4]*w[1] = (1+eps)/2 , where eps is some small positive constant. I've been trying to formulate a function that takes care of this, but I can't really make it work so any suggestions would be
2018 May 05
1
adding overall constraint in optim()
Hi, You can use the projectLinear argument in BB::spg to optimize with linear equality/inequality constraints. Here is how you implement the constraint that all parameters sum to 1. require(BB) spg(par=p0, fn=myFn, project="projectLinear", projectArgs=list(A=matrix(1, 1, length(p0)), b=1, meq=1)) Hope this is helpful, Ravi [[al...
2012 Sep 17
2
Constraint Optimization with constrOptim
Hi, I am having trouble using constrOptim. My target is to do a portfolio optimization and there some constraints have to be fulfilled. 1) The weight of each share of the portfolio has to be greater than 0 2) The sum of these weights has to be 1 I am able to fulfill either the first or the second constraint but not both. One simple way would be to fulfill the first constraint by using optim as
2019 Feb 14
0
Proposed speedup of spec.pgram from spectrum.R
...) * (j - 2)/2] <- Mod(pgram[, i, j])^2/(spec[, i] * spec[, j]) phase[, i + (j - 1) * (j - 2)/2] <- Arg(pgram[, i, j]) } } } ## correct for tapering for (i in 1L:nser) spec[, i] <- spec[, i]/u2 spec <- drop(spec) spg.out <- list(freq = freq, spec = spec, coh = coh, phase = phase, kernel = kernel, df = df, bandwidth = bandwidth, n.used = N, orig.n = N0,# "n.orig" = "n..." series = series, snames = colnames(x), method = ifelse(!is....
2011 Aug 29
3
gradient function in OPTIMX
Dear R users When I use OPTIM with BFGS, I've got a significant result without an error message. However, when I use OPTIMX with BFGS( or spg), I've got the following an error message. ---------------------------------------------------------------------------------------------------- > optimx(par=theta0, fn=obj.fy, gr=gr.fy, method="BFGS", > control=list(maxit=10000)) Error: Gradient function might be wrong - che...
2007 Nov 21
1
samba as a pdc, Unable to change passwd htrough Windows clients.
...oad_auth_module(395) load_auth_module: auth method trustdomain has a valid init [2007/11/21 12:04:25, 5] auth/auth.c:load_auth_module(395) load_auth_module: auth method winbind has a valid init [2007/11/21 12:04:25, 5] auth/auth_util.c:make_user_info_map(216) make_user_info_map: Mapping user [SPG]\[pramod] from workstation [GBSBLR04] [2007/11/21 12:04:25, 3] smbd/sec_ctx.c:push_sec_ctx(256) push_sec_ctx(523, 501) : sec_ctx_stack_ndx = 1 [2007/11/21 12:04:25, 3] smbd/uid.c:push_conn_ctx(287) push_conn_ctx(101) : conn_ctx_stack_ndx = 0 [2007/11/21 12:04:25, 3] smbd/sec_ctx.c:set_sec_ctx(2...
2012 Oct 16
2
gam (mgcv) problem: Error in while (mean(ldxx/(ldxx + ldss)) > 0.4) { :, missing value where TRUE/FALSE needed
...ainl1xY)+s(rainl2xY)+s(tempxY), data=dsub, weights=wvec) Error in while (mean(ldxx/(ldxx + ldss)) > 0.4) { : missing value where TRUE/FALSE needed Using traceback, I get the following output (which I don't understand) 1> traceback() 7: initial.sp(w * X, S, off) 6: initial.spg(G$X, G$y, G$w, G$family, G$S, G$off, G$L, G$lsp0) 5: estimate.gam(G, method, optimizer, control, in.out, scale, gamma, ...) 4: gam(ndvi ~ s(rain) + s(temp) + s(rainl1) + s(rainl2) + s(rainxY) + s(rainl1xY) + s(rainl2xY) + s(tempxY), data = dsub, weights = wvec) 3: eval.with.vis(expr...
2000 Feb 01
1
plotting spectrum of time series etc
...9;t work (all with the same error message, below). And the 'ts'ibrary was loaded with "library(ts)" or "library("ts"). I also tried library(tseries) but got the same problem. Could anyone please give me some help with this? > spectrum(seriesa) Error in plot.spec(spg.out, ...) : binary operator applied to invalid types. Also, I'm running R under windows 95, and I can't seem to set the line length of the display right. So sometimes I got an error message that's too long and I can't read it in full. I tried options(width=??) or .Options$width=??,...
2000 Aug 26
0
smbsh - Samba 2.0.7 - Solaris 2.6? Thanks!
...e! Thanks, Kurt Kurt G. Stam Lucent Technologies - Bell Labs Innovations, Software Products Group One Main Street, Cambridge MA 02142-1517, USA Voice: +1 617 528-8115 Fax: +1 617 225-2220 Email: KStam@Lucent.com Local sites : SPG; ArborFM Global sites: Lucent; SPG -------------- next part -------------- HTML attachment scrubbed and removed
2008 Apr 23
1
BB - a new package for solving nonlinear system of equations and for optimization with simple constraints
...ng nonlinear systems. We hope that this package fills that need. We also have an implementation of the spectral projected gradient method for the optimization of (smooth) nonlinear objective functions, subject to simple constraints that can be defined as a projection mapping. This function, spg(), is suited for large-scale optimization. It generally performs better than the conjugate-gradient methods in "optim", and complements the "low-memory BFGS" method for constraints that can be defined by the user as projection mapping. Best regards, Ravi. --------------...
2010 Oct 15
2
using optimize with two unknowns, e.g. to parameterize a distribution with given confidence interval
Hi, I would like to write a function that finds parameters of a log-normal distribution with a 1-alpha CI of (x_lcl, x_ucl): However, I don't know how to optimize for the two unknown parameters. Here is my unsuccessful attempt to find a lognormal distribution with a 90%CI of 1,20: prior <- function(x_lcl, x_ucl, alpha, mean, var) { a <- (plnorm(x_lcl, mean, var) - (alpha/2))^2 b
2009 Feb 24
2
Tracing gradient during optimization
Hi everyone, I am currently using the function optim() to maximize/minimize functions and I would like to see more output of the optimization procedure, in particular the numerical gradient of the parameter vector during each iteration. The documentation of optim() describes that the trace parameter should allow one to trace the progress of the optimization. I use the following command:
2012 Feb 01
3
Probit regression with limited parameter space
...this difference in the estmation of standard errors and how this computation is carried out in glm. 2) Does any one know how to estimate a constrained probit model in R (to be specific, I need to restrain the range of three parameters to [-1,1])? Among the optimation functions, so far nlminb and spg work for my problem, but neither produces a hessian matrix. As I mentioned above, if I use hessian funciton and calculate standard errors manually, the standard errors seem not right. Many thanks in advance for your kind help. Maomao [[alternative HTML version deleted]]