Displaying 20 results from an estimated 1000 matches similar to: "constrOptim and problem with derivative"
2011 Dec 21
1
constrOptim and further arguments
Dear List,
I have the code below, where I am using the constrained optimisation
package, 'constrOptim.nl' to find the values of two values, b0 and b1.
I have no problems when I enter further variable information DIRECTLY into
the functions, fn, and heq. In this instance I require fn to have -0.0075
appended to it, and in the case of heq, h[1] has -0.2.
library(alabama)
2011 Dec 19
1
None-linear equality constrained optimisation problems
Dear R users,
I have a problem. I would like to solve the following:
I have
pL = 1/(1+e^(-b0+b1))
pM = 1/(1+e^(-b0))
pH = 1/(1+e^(-b0-b1))
My target function is
TF= mean(pL,pM,pH) which must equal 0.5%
My non-linear constraint is
nl.Const = 1-(pM/pH), which must equal 20%, and would like the values of
both b0 and b1 where these conditions are met.
I have searched widely for an answer,
2011 Nov 15
2
Regular expressions in R
Good afternoon list,
I have the following character strings; one with spaces between the maths
operators and variable names, and one without said spaces.
form<-c('~ Sentence + LEGAL + Intro + Intro / Intro1 + Intro * LEGAL +
benefit + benefit / benefit1 + product + action * mean + CTA + help + mean
* product')
2011 Nov 14
2
Help with text separation
Good morning R list,
My apologies if this has *already* answered elsewhere, but I have not found
the answer that I am looking for.
I have a character string, i.e.
form<-c('~ A + B + C + C / D + E + E / F + G + H + I + J + K + L * M')
Now, my aim is to find the position of all those instances of '*' and to
remove said '*'. However, I would also like to remove the
2003 Oct 29
1
constrOptim doesn´t send arguments to optim!(?)
Hi,
I think that there something wrong with the 'constrOptim' max/minimization
function because she doesn?t send extra arguments to 'optim' call.
Fact: When I use optim in a f(x,theta)-like function, everything goes ok.
But using constrOptim with the same function leads to error...
Proof: Make a small change in the 'Rosenbrock Banana function' (taken from
the Examples
2009 Nov 18
1
bug in '...' of constrOptim (PR#14071)
Dear all,
There appears to be a bug in how constrOptim handles ... arguments that
are suppose to be passed to optim, according to the documentation. This
means you can't get the hessian to be returned, for example (so this is
a real problem, and not just a question of mistaken documentation).
Looking at the code, it appears that a call to the user-defined f
includes the ..., when the ...
2007 Sep 07
1
'initial value not feasible' in constrOptim
Dear friends.
I am using function
constrOptim(c(0.5,0.3,0.5), fit.error, fit.error.grr, ui=-1*ui,ci=-1*ci)
and I am confronted with error message "initial value not feasible"
I plug in the initial value of (0.5,0.3,0.5) to function fit.error and
fit.error.grr and have pretty reasonable result. I inequality "ui %*% theta
- ci >= 0" as suggested in the R manual and it is
2007 Sep 10
2
Are the error messages of ConstrOptim() consisten with each other?
Dear Friends.
I found something very puzzling with constOptim(). When I change the
parameters for ConstrOptim, the error messages do not seem to be
consistent with each other:
> constrOptim(c(0.5,0.3,0.5), f=fit.error, gr=fit.error.grr, ui=ui,ci=ci)
Error in constrOptim(c(0.5, 0.3, 0.5), f = fit.error, gr = fit.error.grr, :
initial value not feasible
> constrOptim(c(0.5,0.9,0.5),
2009 Nov 04
3
Constrained Optimization
Hi All,
I'm trying to do the following constrained optimization example.
Maximize x1*(1-x1) + x2*(1-x2) + x3*(1-x3)
s.t. x1 + x2 + x3 = 1
x1 >= 0 and x1 <= 1
x2 >= 0 and x2 <= 1
x3 >= 0 and x3 <= 1
which are the constraints.
I'm expecting the answer x1=x2=x3 = 1/3.
I tried the "constrOptim" function in R and I'm running into some issues.
I first start off
2008 May 18
1
plot a function with a vector as argument
I tried to define a function using another function I defined before, and the
previous function has a vector as an argument, when I tried to get the graph
of the new function, there was something going wrong. Here is a simple
example to explain how it happend:
fr1 <- function(x,y){
x^2+x*y+1
}
fr2 <- function(x){
fr1(x,3)
}
plot(fr2)
In this case, it worked just fine. But when I
2006 Dec 08
1
MAXIMIZATION WITH CONSTRAINTS
Dear R users,
I?m a graduate students and in my master thesis I must
obtain the values of the parameters x_i which maximize this
Multinomial log?likelihood function
log(n!)-sum_{i=1]^4 log(n_i!)+sum_
{i=1}^4 n_i log(x_i)
under the following constraints:
a) sum_i x_i=1,
x_i>=0,
b) x_1<=x_2+x_3+x_4
c)x_2<=x_3+x_4
I have been using the
?ConstrOptim? R-function with the instructions
2010 Feb 25
1
multicore in R
Hi,
i have a function:
zz<- (constrOptim(c(.5,0), fr, grr, ui=rbind(c(-1,0),c(1,-1)), ci=c(-0.9,0.1)))
i can get the result by using command (for example): zz$par
now if i can use multicore:
zz<-parallel(constrOptim(c(.5,0), fr, grr, ui=rbind(c(-1,0),c(1,-1)),
ci=c(-0.9,0.1)))
result < collect(zz)
i cant get my the result: result$par because multicore add process id.
for example:
2016 Apr 13
0
on the output of constrOptim()
Dear list,
The following example of constrOptim() where the initial point is the solution shows that the component counts is not a two-element vector as documented in the man page.
constrOptim(c(1,1), fr, grr, ui = diag(2), ci = c(0,0))
Does anyone have the same behavior?
A possible solution is to put line 69 in constrOptim.R before the first possible break line 67.
Regards, Christophe
2007 Sep 09
2
What does it mean by "initial value not available"?
Dear friends.
I use ConstrOptim( ) and got error message "initial value not available".
My understanding of "initial value not available" is that one of the
following 3 cases happens:
1.The objective function is not well defined at the point of the initial
value.
2. The differentiation of the objective function is not well defined at the
point of the initial value.
3. The
2007 Apr 20
1
Hiding "Warning messages" in coxme output
Dear list,
I have been trying to use coxme in R 2.3.1.
When I use coxme in the following data sim.fr1, i get
"Warning messages: using 'as.environment(NULL)' is
deprecated"
Why does it occur?
How can I hide such warning message,
especially when coxme is under a loop?
Mohammad Ehsanul Karim (Institute of Statistical
Research and Training, University of Dhaka)
>
2012 Apr 29
1
Error in if (nuhat < 2) stop("The degrees of freedom must be greater than or equal to 2") : missing value where TRUE/FALSE needed
Hi,
i am trying to run an ANCOVA and a bootstrapped ANCOVA analysis on a specific data set. I am using the ancova and ancboot functions as in the following code:
setwd("C:/Users/User/Desktop/Rdatabilingualstudy2012")
bilingualismdata<-read.spss("bilingualdataforconferences2012.sav", use.value.labels = TRUE, to.data.frame = TRUE)
2005 Mar 29
1
Updating my address book
NB: This is real not spam... looks to be quite good :)
Cya
Peter
Hi
I am using a new service to keep in contact with my friends. Use the link below to become part of my address book. In the future I will be able to see any changes in your contact details.
http://www.bebo.com/fr1/12574050a478627078b188344281c844017339d70
Thanks.
Peter
2004 May 24
2
High CPU utilization
Apparently nobody has a suggestion to why smbd process all of a sudden starts
sucking CPU like crazy? Restarted samba and then restarting the entire server
does not fix it. Searching the archives shows I'm not the only one with this
problem. The archives do not show what to do about it yet. Grr...
Redhat 9.0
Samba 3.04 ( I have 2.2.7 servers that have done this to me also)
- Gary
2012 May 25
2
problem with installing rms package
Hi
I am trying to install "rms" package but while installing it shows
following error
package 'survival' 2.36-2 is loaded, but >= 2.36.3 is required by 'rms'
what to do?
i am using linux OS
I have tried by updated r-base-core but it didnt work
regards
GRR
[[alternative HTML version deleted]]
2015 Mar 16
0
Re: Can't create any KVM template due to the error with libguestfs
[root@fr1 tmp]# cd /tmp
[root@fr1 tmp]# cpio -id < /usr/lib64/guestfs/supermin.d/daemon.img
cpio: sbin/guestfsd not created: newer or same age version exists
cpio: etc/guestfsd.suppressions not created: newer or same age version
exists
3629 blocks
[root@fr1 tmp]# ldd /tmp/sbin/guestfsd
linux-vdso.so.1 => (0x00007fff9e9d4000)
libacl.so.1 => /lib64/libacl.so.1