similar to: error: Error in if (is.na(f0$objective)) { : argument is of length zero

Displaying 20 results from an estimated 100 matches similar to: "error: Error in if (is.na(f0$objective)) { : argument is of length zero"

2013 Feb 15
1
minimizing a numerical integration
Dear all, I am a new user to R and I am using pracma and nloptr libraries to minimize a numerical integration subject to a single constraint . The integrand itself is somehow a complicated function of x and y that is computed through several steps. i formulated the integrand in a separate function called f which is a function of x &y. I want to find the optimal value of x such that the
2013 Feb 27
0
A program running for a too long time
Dear all, The attached code is supposed to minimize a numerical integration subject to a non linear constraint. The code runs for 2 days& more without giving an output. Also, when i change the value of "m<-100" to "m<-1" it gives an output in areasonable period but with a message " maximum number of iterations in romberg has been reached". I need to : 1-
2009 Nov 20
3
symbol in the plot
a graph question. Thanks a lot in advance. I made two scatterplots on one graph (sigma vs. delta1, sigma vs. delta2) (20 observations of delta1, delta2 and corresponding sigma) the x-axis is sigma, the y-axis is either delta1 or delta2. I connected both scatterplots. To seperate them, one curves is a line with circles, the other curve is a line with squares on it. I want to make a notation
2005 Nov 17
3
loess: choose span to minimize AIC?
Is there an R implementation of a scheme for automatic smoothing parameter selection with loess, e.g., by minimizing one of the AIC/GCV statistics discussed by Hurvich, Simonoff & Tsai (1998)? Below is a function that calculates the relevant values of AICC, AICC1 and GCV--- I think, because I to guess from the names of the components returned in a loess object. I guess I could use
2006 Jun 19
2
Nested variance-covariance matrix in Multilevel model
Dear R community, I have trouble implementing a nested variance-covariance matrix in the lme function. The model has two fixed effects called End and logpgc, the response variable is the logarithm to base 2 of Intensity ( log2(Intensity) ) and the random effects are called Probe and ProbeNo. The model has the following nesting structure: A Pixel is nested within the ProbeNo,the ProbeNo is
2006 Dec 14
3
Model formula question
Hi all, I'm not familiar with R programming and I'm trying to reproduce a result from a paper. Basically, I have a dataset which I would like to model in terms of successive increments, i.e. (y denote empirical values of y) y_1 = y1, y_2 = y1 + delta1, y_3 = y1 + delta1 + delta2. ... y_m = y1 + sum_2^m delta j where delta_j donote successive increments in the y-values, i.e. delta
2002 Mar 12
1
Sparse matrix methods
Does anyone know of contributions to R for solving sparse linear systems? In particular for spatial stats I am interested in solving large positive definite symmetric systems. Thanks in advance, Doug ----------------------------------------------------------------------------- Doug Nychka, Geophysical Statistics Project Email: nychka at ucar.edu National Center for Atmospheric
2006 Jul 22
1
Why the contrain does not work for selecting a particular range of data?
Dear: Continuing the issue of 'ifelse'! I selecting the data whose 'x2'=1 for maximizing likelihood. I used two way to do this but the results are different. 1.Way one I use the data for x2=1 and run the program. It works for me. Tthe program is described as below: function (parameters,y1,x11) { p<-parameters[1] alpha1<-parameters[2] beta1<-parameters[3]
2006 Jul 22
1
ifelse command
Dear: I try to revise the maximum likelihood function below using something constrains. But it seems something wrong with it. Becasue R would not allow me to edit the function like this. It is very appreciate if you can help. function (parameters,y,x1,x2) { p<-parameters[1] alpha1<-parameters[2] beta1<-parameters[3)] delta1<-parameters[4] alpha2<-parameters[5]
2006 Jun 14
2
Bug or not? (PR#8977)
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig807B2312A20EAF60129FDDFA Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, I am writing this email, because I am not sure if the issue I have discovered is a bug or not. For a few days I have been fiddling around with a small program that calculates the reflectance of
2012 Dec 04
1
Solve system of equations (nleqslv) only returns origin
I'm solving 4 complex equations simultaneously. Code is below. The code returns only zero's for the solution though there should also be a non-zero result. I'm pretty confident that the equations are correct because they are straight from a published paper and I checked them pretty thoroughly. The parameter values I used are from the published paper as well. Any suggestions for how
2010 May 18
1
proportion of treatment effect by a surrogate (fitting multivariate survival model)
Dear R-help, I would like to compute the variance for the proportion of treatment effect by a surrogate in a survival model (Lin, Fleming, and De Gruttola 1997 in Statistics in Medicine). The paper mentioned that the covariance matrix matches that of the covariance matrix estimator for the marginal hazard modelling of multiple events data (Wei, Lin, and Weissfeld 1989 JASA), and is implemented
2017 May 18
3
Memory accesses and determining aliasing at the MI level
In order to implement a subtle memory access optimisation during post-RA scheduling, I want to be able to determine some properties about the memory access. If I have two registers referring to memory, how can I determine if they are derived from the same base-pointer? Often LLVM will optimise to use intermediate registers holding partial displacements, for example, when a 'struct'
2011 May 12
1
Maximization of a loglikelihood function with double sums
Dear R experts, Attached you can find the expression of a loglikelihood function which I would like to maximize in R. So far, I have done maximization with the combined use of the mathematical programming language AMPL (www.ampl.com) and the solver SNOPT (http://www.sbsi-sol-optimize.com/manuals/SNOPT%20Manual.pdf). With these tools, maximization is carried out in a few seconds. I wonder if that
2008 Jul 08
1
R crash with ATLAS precompiled Rblas.dll on Windows XP Core2 Duo
I noticed a problem using R 2.7.1 on Windows XP SP2 with the precompiled Atlas Rblas.dll. Running the code below causes R to crash. I started R using Rgui --vanilla and am using the precompiled Atlas Rblas.dll from cran.fhcrc.org dated 17-Jul-2007 05:04 for Core2 Duo. The code that causes the crash: x <- rnorm(100) y <- rnorm(100) z <- rnorm(100) loess(z ~ x * y) loess(z ~ x) does
2013 Sep 18
2
cov2cor exp
Ok, Thanks foe the answer, Ken: *1L, 2L etc are integers. (That is, identical to as.integer(1) , as.integer(2) etc) Using integers (instead of "numeric" type) is more efficient as here they're used as indexes and would be converted to integer anyway. Compare > is(1) ... and > is(1L) 1L:p is the sequence 1, 2, 3, ..., p (just like 1:p) Just for curiosity, what is
2013 Jan 03
0
help with NLOPTR
I have a complex function that I want to maximize (I have multiplied this function by -1 so that it becomes a minimization problem in the code below). This function has two equality constraints. I get the programs to run but the answer isn't correct because, when it does converge, at least one of the constraints is violated. Any suggestions? Code below Violated constraint (an easy check):
2010 Mar 16
0
recursive term
Hi r-users;   I have this values: eign_val <- c(137.810447,3.538721,2.995161,1.685670) alp    <- 1.6549 ;  lamda <- eign_val lamda_m <- min(lamda)   First I calculated manually: delta0 <- 1 delta1 <- alp*delta0*(4-lamda_m*(1/lamda[1]+1/lamda[2]+1/lamda[3]+1/lamda[4]))  delta1 delta2 <- (alp/2)*(delta1*(delta1/alp) + delta0*((1-lamda_m/lamda[1])^2+
2004 May 27
1
modes of objects
Hi R People: I am looking for some objects: >objects(pat="f") [1] "dufus" "f" "f1" "fake.df" "ff" "fm1" "one.df" "one1.df" "x.df" "xf" >mode(objects(pat="f")) [1] "character" > I would like to determine the mode of these objects.
2006 May 16
1
r-help@stat.math.ethz.ch
Dear All: I tried to fit negative binomial distribution to data in terms of mean and mean is also a quadratic function of another variable. The likelihood function is: function (parameters, y1,x11) { p<-parameters[1] alpha1<-parameters[1] beta1<-parameters[2] delta1<-parameters[3] mu<-alpha1+beta1*(x11)+delta1*(x11^2) ifelse(y1>=0|x11>=0, L<-