similar to: Trouble with optim on a specific problem

Displaying 20 results from an estimated 400 matches similar to: "Trouble with optim on a specific problem"

2009 Jun 16
1
Constrained Optimization, a full example
After a few days of work, I think I nearly have it. Unfortunately, theta is unchanged after I 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
2009 Jun 16
3
The most straightfoward way to write a function that sums over the rows of a matrix
Hello! I am trying to write a function with vector and data.frame parameters that uses the sum() function and values from the rows of the data.frame. I need to pass this function as a parameter to optim(). My starting point is: observs <- data.frame(y, x1, x2, x3) Fn <- function(par, observs) { sum( (y - (par[1] * (x1 + 1) * x2^(-par[2]) * x3^par[3])^2 ) }
2006 Feb 16
0
(m)simtest ?
Hi,. We have 2 values (first formant F1, second formant F2) for a given phoneme for six languages. We want to see whether the languages are significantly different one from another for this given phoneme. We have done a manova on our data and it works well, but we doesn't allow us to see which pair of languages are different. If we have only one formant for the phoneme, we would use
2010 May 11
3
Improving loop performance
R-users, I have the following piece of code which I am trying to run on a dataframe (aga2) with about a half million records.  While the code works, it is extremely slow.  I've read some of the help archives indicating that I should allocate space to the p1 and ags1 vectors, which I have done, but this doesn't seem to improve speed much.  Would anyone be able to provide me with advice on
2011 Jan 27
1
Errors in Integrate
Hello, I have written the function I would like to integrate in two ways: denfxn <- function(yy,vv,a2,b2,mu2) { pp <- 1-pnorm(yy/sqrt(vv)) part1 <- pp^(a2-1) part2 <- (1-pp)^(b2-1) part3 <- dnorm(yy,mu2,sqrt(vv)) return(part1*part2*part3) } denfxnorg <- function(yy,vv,a2,b2,mu2) { pp <- 1-pnorm(yy/sqrt(vv)) pp <- if (pp < .001) .001 else
2002 Jan 30
3
RC2 better than RC3? Graphed!
Well, this question comes once and again. I have RC3 and Garf's RC2 tuned versions (160 and 350) in a nice graph. Nobody should be surprised that RC3 is better, but in some cases GRC2 shows better EAQUAL/bitrate results. There seems to be room for improvement in RC3 with some tweaking. See it by yourself at http://audio.sinderman.com/ Cheers, AGS.
2012 Mar 01
1
Need help using Melt and cast to compute correlation for a cross tabulation
I have a data frame with a number of observed and predicted values by classification as shown below: Count Volume FCLASS 1 55000 60000 Grade Separated 2 43000 39000 Grade Separated 3 26000 26500 Major Arterial 4 19500 20000 Major Arterial ... There are four classes here: Grade Separated, Major Arterial, Minor Arterial, and Collector I am looking
2012 Apr 05
1
Better to use a single large storage server or multiple smaller for mdbox?
I'm trying to improve the setup of our Dovecot/Exim mail servers to handle the increasingly huge accounts (everybody thinks it's like infinitely growing storage like gmail and stores everything forever in their email accounts) by changing from Maildir to mdbox, and to take advantage of offloading older emails to alternative networked storage nodes. The question now is whether having a
2006 Oct 13
4
nontabular logistic regression
Hi. I'm attempting to fit a logistic/binomial model so I can determine the influence of landscape on the probability that a box gets used by a bird. I've looked at a few sources (MASS text, Dalgaard, Fox and google) and the examples are almost always based on tabular predictor variables. My data, however are not. I'm not sure if that is the source of the problems or not because the
2011 May 30
1
Error in minimizing an integrand using optim
Hi, Am not sure if my code itself is correct. Here's what am trying to do: Minimize integration of a function of gaussian distributed variable 'x' over the interval qnorm(0.999) to Inf by changing value of parameter 'mu'. mu is the shift in mean of 'x'. Code: # x follows gaussian distribution # fx2 to be minimized by changing values of mu # integration to be done over
2010 Jul 12
9
Kernel 2.6.35 and .Net Framework
Is there anyone who can run .Net Framework 2.0 with the stable kernel 2.6.34 or 2.6.35? I can successfully install dotnet2 both with kernel 2.6.33 and 2.6.35, but can only run it when booting into kernel 2.6.33. With kernel 2.6.35 I don't have the permission as user to run dotnet2, and get an access denied. An example: Running AGS (Adventure Game Studio) with kernel 2.6.33 works fine. But
2005 Dec 14
4
unable to force the vector format
Dear all, I am so ashamed to pollute the list with a trivial question, but it is a long time I have not used R, and I need a result in the next one or two hour... I have a table which I have loaded with read.table, and I want to make the mean of its columns. > slides <- read.table("slides.txt") > slides [1:5,] V1 V2 V3 V4 V5 V6 V7 V8 1
2000 Jan 11
1
a +1 shift overlaying lines/points on a boxplot (PR#398)
Full_Name: Adrian Custer Version: 0.90.0 OS: Linux on Thinkpad (pentium) and desktop (K6) Submission from: (NULL) (128.32.251.234) When I create a boxplot, and then try to overlay a lowess fit or just the points, the points do not appear in the highest level and the lowess curve does not reach the highest level. However, if I add one to each of the models, the problem is solved. I tried this
2010 Dec 05
1
HOW to use the survivalROC to get optimal cut-off values?
I have the same problem of a prevous request HOW to use the survivalROC (or another library in R) to get optimal cut-off values? I want to use the time-dependent survivalROC package.according to the,reference material,it only gives a set of ordered cut-off values .eg. -------------------------------------------------------------------------------- data(mayo) str(mayo) attach(mayo)
2010 Dec 05
1
HOW to use str() after the survivalROC (or another library in R) to get optimal cut-off values
I have the same problem of a previous request HOW to use the survivalROC (or another library in R) to get optimal cut-off values? I want to use the time-dependent survivalROC package.according to the,reference material,it only gives a partial set of ordered cut-off values .eg. -------------------------------------------------------------------------------- data(mayo) str(mayo) attach(mayo)
2011 Nov 04
2
Reading parameters from dataframe and loading as objects
Hi List, I want to read several parameters from data frame and load them as object into R session, Is there any package or function in R for this?? Here is example param <-c("clust_num", "minsamp_size", "maxsamp_size", "min_pct", "max_pct") value <-c(15, 20000, 200000, 0.001, .999) data <- data.frame ( cbind(param , value)) data
2008 Apr 04
1
rxfax crashes Asterisk (segmentation fault)
Hi, I am using spandsp-0.0.4, tiff-3.8.2, and agx-ags-addon with Asterisk 1.4.18. Everytime rxfax executes, Asterisk crashes: -- Executing [fax at phones:1] Set("Zap/2-1", "FAXFILE=/var/spool/asterisk-fax/1207322398.0.tif") in new stack -- Executing [fax at phones:2] RxFAX("Zap/2-1", "/var/spool/asterisk-fax/1207322398.0.tif") in new st ack [Apr 4
2008 Mar 08
1
ask for help on nonlinear fitting
I have a table like the following. I want to fit Cm to Vm like this: Cm ~ Cl+Q1*b1*38.67*exp(-b1*(Vm-Vp1)*0.03867)/(1+exp(-b1*(Vm-Vp1)*0.03867))^2+Q2*b2*38.67*exp(-b2*(Vm-Vp2)*0.03867)/(1+exp(-b2*(Vm-Vp2)*0.03867))^2 I use nls, with start=list(Q1=2e-3, b1=1, Vp1=-25, Q2=3e-3, b2=1, Vp2=200). But I always get 'singlular gradient' error like this. But in SigmaPlot I can get the result. How
2020 Jun 16
1
Simple scan in CentOS 7
On 06/15/2020 08:58 PM, Fred Smith wrote: > On Mon, Jun 15, 2020 at 04:28:17PM -0400, H wrote: >> I just installed C7 on a new computer and despite Simple Scan being installed as part of C7, I have not been able to get it to recognize my Canon scanner connected to a USB port. I did have it running on another computer with C7 so there should not be any inherent issues. >> >> On
2018 May 16
0
Systemfit
Sadly you failed to set your email program to send plain text and the data is corrupted at my end. I also think you need to reduce the size of the data set... the intent here is to increase your understanding, not debug your particular analysis. I will say that I am having a very challenging time understanding what you are trying to accomplish though. What are the equations that you think need