Displaying 20 results from an estimated 2000 matches similar to: "Nlminb equivalent function in R?"
2002 May 15
3
Struchture change of a data frame
Hi guys
I've got an easy question but couldn't find any quick solution. I woulk
like to change the following matrix
good bad worse
Blue 1 2 2
Yellow 2 1 3
Black 3 4 4
Into the following structure
good 1 Blue
Bad 2 Blue
Worse 2 Blue
Good 2 Yellow
Bad 1 Yellow
Worse 2 Yellow
Good 2 Black
Bad 4 Black
Worse 4 Black
Thanks a lot.
Regards
Beat Huggler
---
Beat Huggler
Quantitative
2002 Feb 06
1
Probblems with loading the tcltk library
Hi guys
Recently a wanted to look at the opotunities which are suported by the
labrary of tcltk. Unfortunatly I couldn't load the library and it
occured the following error message:
Error in firstlib(which.lib.loc, package) :
TCL_LIBRARY is not set
Error in library(pkg, character.only = TRUE) :
.First.lib failed
I've tried to load it in sveral ways. I reinstalt the
2002 Mar 21
0
RODBC
Hi guys
I'm working with with R1.4.1 on windows
I'm trying to import data from the ODBC (Access database) with the
library RODBC. Every thing works perfect except that the dates are
factors.
> library(RODBC)
> xx <- odbcConnect("grave_liv")
> dat <- sqlQuery(xx,"SELECT All_MONTHLY.ID, All_MONTHLY.Date,
All_MONTHLY.RoR FROM (Reasons INNER JOIN
2016 Apr 26
0
Linear Regressions with constraint coefficients
Have you tried web searching on " R constrained linear regression" or
similar. There seemed to be resources related to your issues when I
looked. You might also search on rseek.org . There are apparently
several packages that do regression with constraints, but I don't know
if they fit your situation.
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that
2016 Apr 28
0
Linear Regressions with constraint coefficients
The nls2 package can be used to get starting values.
On Thu, Apr 28, 2016 at 8:42 AM, Aleksandrovic, Aljosa (Pfaeffikon)
<Aljosa.Aleksandrovic at man.com> wrote:
> Hi Gabor,
>
> Thanks a lot for your help!
>
> I tried to implement your nonlinear least squares solver on my data set. I was just wondering about the argument start. If I would like to force all my coefficients to
2016 Apr 26
2
Linear Regressions with constraint coefficients
Ok, and if I would just like to force my slope coefficients to be inside an interval, let's say, between 0 and 1? Is there a way in R to formulate such a constraint regression?
Thanks in advance and kind regards,
Aljosa
Aljosa Aleksandrovic, FRM, CAIA
Quantitative Analyst - Convertibles
aljosa.aleksandrovic at man.com
Tel +41 55 417 7603
Man Investments (CH) AG
Huobstrasse 3 | 8808
2016 Apr 26
0
Linear Regressions with constraint coefficients
This is a quadratic programming problem that you can solve using
either a quadratic programming solver with constraints or a general
nonlinear solver with constraints. See
https://cran.r-project.org/web/views/Optimization.html
for more info on what is available.
Here is an example using a nonlinear least squares solver and
non-negative bound constraints. The constraint that the coefficients
sum
2016 Apr 28
2
Linear Regressions with constraint coefficients
Hi Gabor,
Thanks a lot for your help!
I tried to implement your nonlinear least squares solver on my data set. I was just wondering about the argument start. If I would like to force all my coefficients to be inside an interval, let?s say, between 0 and 1, what kind of starting values are normally recommended for the start argument (e.g. Using a 4 factor model with b1, b2, b3 and b4, I tried
2016 Apr 26
1
Linear Regressions with constraint coefficients
If the slope coefficients sum to a constant, the regressors are
dependent and so a unique solution is impossible (an infinity of
solutions would result). So I think you have something going on that
you don't understand and should consult a local statistician to help
you formulate your problem appropriately.
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people
2016 Apr 26
5
Linear Regressions with constraint coefficients
Hi all,
I hope you are doing well?
I?m currently using the lm() function from the package stats to fit linear multifactor regressions.
Unfortunately, I didn?t yet find a way to fit linear multifactor regressions with constraint coefficients? I would like the slope coefficients to be all inside an interval, let?s say, between 0 and 1. Further, if possible, the slope coefficients should add up to
2004 Sep 15
6
Bessel function
Dear all
Currently, I'm implementing the generalized hyperbolic distribution into
Splus. Unfortunately the Bessel function is not implemented in Splus. In
R the Bessel function does exist but it is an internal function and I'm
not able to look at the code.
Is there any possibility to see the code of the Bessel function in R or
does anybody has an implementation of the Bessel function in
2010 Jul 20
1
[LLVMdev] Rendering MachineFunctions as HTML.
Hi All,
I've developed a pass to render machine functions as HTML pages with some
accompanying information about liveness and register pressure.
Current features:
Renders machine functions, optionally displaying estimated register pressure
for selected register classes, and liveness for selected intervals.
The following command line options can be used to enable and customise the
2011 Jan 21
3
nlminb doesn't converge and produce a warning
Hi Everybody,
My problem is that nlminb doesn't converge, in minimising a logLikelihood
function, with 31*6 parameters(2 weibull parameters+29 regressors repeated 6
times).
I use nlminb like this :
res1<-nlminb(vect, V, lower=c(rep(0.01, 12), rep(0.01, 3), rep(-Inf, n-15)),
upper=c(rep(Inf, 12), rep(0.99, 3), rep(Inf, n-15)), control =
list(maxit=1000) )
and that's the result :
2009 Nov 29
1
optim or nlminb for minimization, which to believe?
I have constructed the function mml2 (below) based on the likelihood function described in the minimal latex I have pasted below for anyone who wants to look at it. This function finds parameter estimates for a basic Rasch (IRT) model. Using the function without the gradient, using either nlminb or optim returns the correct parameter estimates and, in the case of optim, the correct standard
2008 Oct 02
1
SAS enterprise guide in R?
Hello,
Our company has been looking at "SAS enterprise guide 4" (Insightful Miner is a similar product from Insightful, I believe) which seems to provide a nice graphical way of displaying/managing a process or project. It is also accessible to non-programmers.
Does any of the R GUIs provide similar functionality please? Can you point me in the right direction?
Thanks in advance
Best
2010 Feb 09
2
Double Integral Minimization Problem
Hello all,
I am trying to minimize a function which contains a double integral, using
"nlminb" for the minimization and "adapt" for the integral. The integral is
over two variables (thita and radiusb)
and the 3 free parameters I want to derive from the minimization are
counts0, index and radius_eff.
I have used both tasks in the past successfully but this is the first time
2001 Mar 05
0
Portable openssh-2.5.1p1, auth-passwd.c, yellow pages, expire field
Hi,
I'm having trouble with auth_password() failing on my linux box using
yellow pages. I've tracked the problem down to the following:
pw_password = "RMf.YivanoZc2,o01N"
encrypted_password = "RMf.YivanoZc2"
This fails on the return(strcmp(encrypted_password, pw_password) == 0).
because crypt() only returns 13 characters. I seem to remember the
2012 Jul 04
2
About nlminb function
Hello
I want to use the nlminb function but I have the objective function like
characters. I can summarize the problem using the first example in the
nlminb documentation.
x <- rnbinom(100, mu = 10, size = 10)
hdev <- function(par) -sum(dnbinom(x, mu = par[1], size = par[2], log =
TRUE))
nlminb(c(9, 12), objective=hdev)
With the last instructions we obtain appropriate results. If I have
2006 Jul 23
1
How to pass eval.max from lme() to nlminb?
Dear R community,
I'm fitting a complex mixed-effects model that requires numerous
iterations and function evaluations. I note that nlminb accepts a
list of control parameters, including eval.max. Is there a way to
change the default eval.max value for nlminb when it is being called
from lme?
Thanks for any thoughts,
Andrew
--
Andrew Robinson
Department of Mathematics and Statistics
2010 Dec 07
1
Using nlminb for maximum likelihood estimation
I'm trying to estimate the parameters for GARCH(1,1) process.
Here's my code:
loglikelihood <-function(theta) {
h=((r[1]-theta[1])^2)
p=0
for (t in 2:length(r)) {
h=c(h,theta[2]+theta[3]*((r[t-1]-theta[1])^2)+theta[4]*h[t-1])
p=c(p,dnorm(r[t],theta[1],sqrt(h[t]),log=TRUE))
}
-sum(p)
}
Then I use nlminb to minimize the function loglikelihood:
nlminb(