search for: startvals

Displaying 18 results from an estimated 18 matches for "startvals".

Did you mean: startval
2010 Sep 29
1
nlminb and optim
I am using both nlminb and optim to get MLEs from a likelihood function I have developed. AFAIK, the model I has not been previously used in this way and so I am struggling a bit to unit test my code since I don't have another data set to compare this kind of estimation to. The likelihood I have is (in tex below) \begin{equation} \label{eqn:marginal} L(\beta) = \prod_{s=1}^N \int
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
2011 Dec 11
1
nls start values
...189981, 2.098671, 2.122207, 2.012621, 1.963610, 1.884184, 1.955160, 1.801175, 1.829686, 1.773260, 1.588768, 1.563774, 1.559192) tpoints <- c(0,0,0,2,2,2,4,4,4,6,6,6,8,8,8,12,12,12,14,14,14,16,16,16,18,18,18,20,20,20,24,24,24) shift=mean(gene_expression) # y-axis (expression) shift # Perfect fit startvals <- list(phase=pi, amp=0.5) sine_nls <- nls(gene_expression ~ sin(tpoints * afreq + phase) * amp + shift, start=startvals, algorithm="port", lower=lowervals, upper=uppervals) # Convergence failure startvals <- list(phase=0, amp=0.5) sine_nls <- nls(gene_expression ~ sin(tpoint...
2008 Feb 24
0
problem with ML estimation
dear list, as a part my problem. I have to estimate some parameters using ML estimation. The form of the likelihood function is not straight forward and I had to use a for loop to define the function. I used "optim" to maximise the result but was not sure of the programme. To validate my results, I tried to write a function to obtain the MLE of a bivariate normal in the same manner. On
2008 Apr 25
5
Non-linear system of equations
...I solve the following simple example? x^2 - y^2 = 6 x ? y = 3 I heard about nlsystemfit, but I don?t know how to run it exactly. I have tried the following code, but it doesn?t really work: f1 <-y~ x[1]^2-x[2]^2-6 f2 <-z~ x[1]-x[2]-3 f <- list(f1=0,f2=0) nlsystemfit("OLS",f,startvals=c(0,0)) Thank You in advance for your help. Evgeniq Petrova
2011 Apr 13
0
ddply and nlminb
Hello I'm new to R (one week) so please excuse any obvious mistakes in my code or posting. I am attempting to fit a non linear function defining the relationship between dependent variable A and the variables PAR and T grouped by the condition Di. The following steps are taken in the Rcode below: 1) load the data (not shown) 2) define the function to be fit 3) define the starting values
2012 Dec 10
3
[LLVMdev] [PATCH] Teaching ScalarEvolution to handle IV=add(zext(trunc(IV)), Step)
Hello all, I wanted to get some feedback on this patch for ScalarEvolution. It addresses a performance problem I am seeing for simple benchmark. Starting with this C code: 01: signed char foo(void) 02: { 03: const int count = 8000; 04: signed char result = 0; 05: int j; 06: 07: for (j = 0; j < count; ++j) { 08: result += (result_t)(3); 09: } 10: 11: return result; 12: } I
2011 Mar 10
2
R beginner - Error in as.vector(x, mode)
Hi everyone, I am new to R and keep getting the message Error in as.vector(x, mode) while trying to run nlsystemfit. Below is my exact code. The data is in Stata format because I only recently swapped to R and am trying to compare results from Stata to make sure I know what is going on. I have searched google and read sever R-help articles with this error. They all say the problem is to do
2012 Dec 11
1
Debian packaging and openblas related crash when profiling in R
...p(thetareal, c(FALSE, o[ss, ])) 8: emfred(x, thetaold, indx$o, indx$m, indx$ivector, indx$icap, indx$AMr1, indx$AMr2, AM1stln = AM1stln, returntype = "theta", priors = priors, empri = empri, collect = collect) 9: emarch(x.stacked$x, p2s = p2s, thetaold = NULL, tolerance = tolerance, startvals = startvals, x.stacked$priors, empri = empri, frontend = frontend, collect = collect, autopri = prepped$autopri, emburn = emburn) 10: amelia.default(datM, m = 5, idvars = "group") 11: amelia(datM, m = 5, idvars = "group") Warning: stack imbalance in '<-', 108 then...
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(par, ...) : invalid argument
2005 Sep 26
2
nls and na/Nan/Inf error
I am trying to it a particular nonlinear model common in Soil Science to moisture release data from soil. I have written the function as shown below according to the logist example in Ch8 of Pinheiro & Bates. I am getting the following error (R version 2.1.1) *Error in qr(attr(rhs, "gradient")) : NA/NaN/Inf in foreign function call (arg 1)* Below is the function and data. /#
2007 Jun 07
1
MITOOLS: Error in eval(expr, envir, enclos) : invalid 'envir' argument
...2 1 1 2 1 1 1 2 ... $ os : num 0 1 0 0 1 1 1 0 0 1 ... $ css : num 0 1 0 0 1 1 1 0 0 1 ... $ rfs : num 0 1 1 0 1 1 1 0 0 1 ... $ comp : num 0 1 1 0 1 1 1 0 0 1 ... > set.seed(200) > M <- 50 # Number of imputations > am.imp <- amelia(utt.mi, m=M, p2s=1, startvals=1, write.out=F, + idvars=c('os','css','rfs','comp'), + noms=c('gender','symptoms','site','multifoc','ctnm','prebca','precystec' , + 'smk','surgery','ptnm.t','nodes','grade...
2010 Apr 11
0
[LLVMdev] Proposal: stack/context switching within a thread
On Sun, Apr 11, 2010 at 4:09 PM, Jeffrey Yasskin <jyasskin at google.com> wrote: > Kenneth Uildriks <kennethuil at gmail.com> wrote: >> As I see it, the context switching mechanism itself needs to know >> where to point the stack register when switching.  The C routines take >> an initial stack pointer when creating the context, and keep track of >> it from
2003 Dec 02
0
names of parameters from nonlinear model?
...e operation to test to see if the column is all zeros and tally up a character vector with the names of the columns to obtain the terms in equation i eqn.terms <- vector() for( v in 1:length( est$estimate ) ) { j <- attr( eval( deriv( as.formula( eqns[[i]] ), names( startvals ) ) ), "gradient" ) if( qr( j[,v] )$rank > 0 ) { eqn.terms <- rbind( eqn.terms, name <- names( est$estimate )[v] ) } } derivs[[i]] <- deriv( as.formula( eqns[[i]] ), eqn.terms, hessian=T )...
2007 May 31
0
Using MIcombine for coxph fits
...etach(package: Hmisc) --------------- After examining the missing data patterns, impute 10 datasets using the amelia function from the Amelia package. Check the densities of the continuous variables to make sure they make sense. --------------- library(Amelia) am.imp <- amelia(d, m=10, p2s=1, startvals=1, write.out=F, noms=c('status','sex','hepmeg','trt')) compare.density(data=d, output=am.imp, var='trig') compare.density(data=d, output=am.imp, var='platelet') --------------- Since everything looks ok, fit Cox models to each of the 10 imputed data...
2010 Apr 11
3
[LLVMdev] Proposal: stack/context switching within a thread
Kenneth Uildriks <kennethuil at gmail.com> wrote: > As I see it, the context switching mechanism itself needs to know > where to point the stack register when switching.  The C routines take > an initial stack pointer when creating the context, and keep track of > it from there.  If we don't actually need to interoperate with > contexts created from the C routines, we have
2018 May 10
2
LLVM SCEV isAddRecNeverPoison and strength reduction
+CC llvm-dev On Tue, May 8, 2018 at 2:34 AM, Gal Zohar <Gal.Zohar at ceva-dsp.com> wrote: > I noticed that SCEV, when trying to perform strength reduction, doesn’t use > the ability to prove an induction variable does not signed/unsigned wrap due > to infinite loops. > > Is there an easy way to use the isAddRecNeverPoison function when > determining if strength reduction
2005 Dec 14
2
suggestions for nls error: false convergence
Hi, I'm trying to fit some data using a logistic function defined as y ~ a * (1+m*exp(-x/tau)) / (1+n*exp(-x/tau) My data is below: x <- 1:100 y <- c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,1,1,1,2,2,2,2,2,3,4,4,4,5, 5,5,5,6,6,6,6,6,8,8,9,9,10,13,14,16,19,21, 24,28,33,40,42,44,50,54,69,70,93,96,110,127,127,141,157,169,