search for: maxnr

Displaying 12 results from an estimated 12 matches for "maxnr".

Did you mean: maxn
2010 Mar 12
2
Question regarding to maxNR
Hi R-users, Recently, I use maxNR function to find maximizer. I have error appears as follows Error in maxNRCompute(fn = fn, grad = grad, hess = hess, start = start, : NA in the initial gradient My code is mu=2 s=1 n=300 library(maxLik) set.seed(1004) x<-rcauchy(n,mu,s) loglik<-function(mu) { log(prod(dcauchy(x,mu,s)))...
2010 Aug 28
1
maxNR in maxLik package never stops
Greetings, I use maxNR function under maxLik package to find the REML estimates of the parameters of variance components in heteroskedastic linear regression models. I assume that in the model there is additive/multiplicative/mixed heteroskedasticity and I need estimate the respective parameters of additive/multiplicativ...
2010 Mar 22
1
maxNR - Error in p(a, b) : element 1 is empty; the part of the args list of '*' being evaluated was: (b, t)
...were trying to implement the Newton-Raphson method in R, and estimate the parameters a and b, of a function, F, however we can't seem to implement this the right way. Hope you can show me the right way to do this. I think what we want R to do is to read the data from the website and then peform maxNR on the function, F. Btw the version of R being used is "RGui for Windows" if it helps to know this. R-code below: library(maxLik) > require(maxLik) > > x <- > read.table('http://www.math.ku.dk/kurser/2008-09/blok4/stat2/doku/data/Eksempel_6_3.txt', > header =...
2011 Jun 06
2
Taking Integral and Optimization using Integrate, Optim and maxNR
...e faced with errors, and did not work. What I guess is there is something wrong with taking integral. The output of integrate function in R is some sort of thing. I had to somehow tell it, just take the value and forget about the others. But I guess it is still something wrong with it. I also tried maxNR, but is didn't work either. Question 2-3- Thoes above are the easiest case of my problem. Assume the case that I have summation of f(x1,y)+f(x2,y)+...+f(x12,y) The article have done it by E04JAF-NAG Fortran Library Routine Document. But I want to do it in R. Thanx all. Cheers, Maryam...
2011 Jul 12
1
LOESS function Newton optimization
...LOESS function defined in R. I have a very large dataset (1 million observations) and have run a LOESS regression. Now, I want to run a Newton-Raphson optimization to determine the point at which the slope change is the greatest. I am relatively new to R and have tried several permutations of the maxNR and nlm functions with no success. For example, I used the nlm function as follows: LOESS <- loess(Y ~ X) optim <- nlm(function(x) LOESS(x))... However, this doesn't seem to work. In the examples I see online, the function in nlm and maxNR are user defined, instead of the output of anot...
2020 Oct 09
1
[External] Re: unable to access index for repository...
>>>>> Steven Yen >>>>> on Fri, 9 Oct 2020 05:39:48 +0800 writes: > Oh Hi Arne, You may recall we visited with this before. I > do not believe the problem is algorithm specific. The > algorithms I use the most often are BFGS and BHHH (or > maxBFGS and maxBHHH). For simple econometric models such > as probit, Tobit, and evening
2008 Sep 16
0
Maximum likelihood estimation of a truncated regression model
...fit it for my case. So I wrote the log likelihood function of the truncated regression model and reparametrised it using Olsen (1978) so that the function is globally concave and has an unique maximiser. I used a quasi-Newton method (BFGS) to maximise my function. I also used Newton-Raphson method (maxNR) to maximise my function. The (naive) code can be seen below. sw1<-function(theta,dhat,z) { gamma<-theta[1:2] eta<-theta[3] d1<-dhat*eta-z%*%gamma d2<- eta-z%*%gamma logl<- (-n*0.5*log(2*pi))+(n*log(eta))-(0.5*sum(d1*d1))-(sum(log(pnorm(d2)))) return(-logl) } try(j<-optim(c(a,...
2007 Oct 30
2
Splitting up the micEcon package?
Dear R Users: The functions of our "micEcon" package [1,2] can be subdivided into three categories: - microeconomic demand and firm models - sample selection models (mainly selection()) - routines for (likelihood) maximisation (e.g. maxLik(), maxNR(), maxBHHH()) (mainly used for ML estimation of sample selection models) Although sample selection models are often used in microeconomic analyses, they are also used in several other disciplines. Therefore, we are unsure whether it is better to keep these different functionalities in the mic...
2009 Mar 23
4
newton method
Hi R-users, Does R has a topic on newton's method? Thank you for the info.
2008 Jun 08
2
optim, constrOptim: setting some parameters equal to each other
Hello, and apologies for the upcoming naive questions. I am a biologist who is trying to teach himself the appropriate areas of math and stats. I welcome pointers to suggested background reading just as much as I do direct answers to my question. Let's say I have a function F() that takes variables (a,b,c,a1,b1,c1) and returns x, and I want to find the values of these variables that result in
2001 Sep 12
0
AES update..
...HETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef __RIJNDAEL_H +#define __RIJNDAEL_H + +#define MAXKC (256/32) +#define MAXKB (256/8) +#define MAXNR 14 + +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned int u32; + +/* The structure for key information */ +typedef struct { + int decrypt; + int Nr; /* key-length-dependent number of rounds */ + u32 ek[4*(MAXNR + 1)]; /* encrypt key schedule */ + u32 dk[4*(MAXNR + 1)]; /...
2010 Mar 27
1
R runs in a usual way, but simulations are not performed
...ot;Unsuccessful simulations"), file="70addadd__bads.csv", append=T, quote=T, sep=";", row.names=F, col.names=F) repeat { y <<- generate_y(x,z,beta,alpha,realtype); x <<- x; z <<- z row = matrix(nrow = 1, ncol = 15 + 2*ncol(z) + 2*ncol(x)) NR <- try(maxNR(loglk(simtype),gradvec(simtype),hessmat(simtype),start=starter(simtype,x,y)),silent=TRUE) if (is.list(NR) == TRUE) kr_nr <- kenward_roger_both(simtype,NR$estimate,beta_tested,x,y,z) if (is.list(NR) == TRUE) NRcode <- NR$code else NRcode <- 99 if (existencecheck(kr_nr) == TRUE) kr_nrF_old...