similar to: how to avoid NaN in optim()

Displaying 20 results from an estimated 2000 matches similar to: "how to avoid NaN in optim()"

2010 Apr 06
2
checking bivariate normality
x <- iris$Sepal.Length[1:50]/iris$Sepal.Width[1:50] y <- iris$Petal.Length[1:50]/iris$Petal.Width[1:50] I want to check whether (x,y) follows a bivariate normal distribution or not, using density plot or scatter plot. Is it possible to plot a bivariate density in R. I cant find any. Arindam Fadikar M.Stat Indian Statistical Institute. New Delhi, India [[alternative HTML version
2010 Apr 08
1
square root of inverse
Dear users, How to get a symmetric square root of a positive definite matrix? I have tried using spectral decomposition, but some eigen values come out to be complex. Is there any function in R that can give the symmetric square root of a pd matrix? -- Arindam Fadikar M.Stat Indian Statistical Institute. New Delhi, India [[alternative HTML version deleted]]
2011 Jan 30
1
how to enter frequency type data in R with class intervals
Dear all, Given data of a continuous frequency distribution with class intervals .. how to enter such data so that we can use the normal mean, median and mode functions to calculate them and also can draw histogram .. for example how to enter this data in R Height range[image: ↓]<http://en.wikipedia.org/wiki/Frequency_distribution#> Number of students[image: ↓]
2012 May 16
23
Xen or KVM
Hi, I am new to virtualization and I am having the obvious hassle of choosing between Xen and KVM. Can Xen experts help me with this? Regards, Arindam _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
2001 Dec 31
2
iproute & kernel 2.4.17
hi all.. i just noticed while patching ulog(patch-o-matic) with kernel-2.4.17--->patch not applied ! would be gratefull if someone can help on this ( Gurus ''am not a programmer pls.):-( arindam
2002 May 27
4
htb3 with imq
hi all, i want to try htb3 with imq downloaded & patched imq & htb3 with kernel-2.4.18 on rh7.2 but got STUCK on step 1 :( this are what i did can anyone guide me what went wrong on the first step itself !! [root@cab1 root]# modprobe imq numdevs=1 modprobe: Can''t locate module imq [root@cab1 root]# [root@cab1 root]# tc qdisc add dev imq0 handle 1: root htb default 1 Cannot find
2009 Jan 05
2
Sweave data-figure coupling
Hi, With the following Sweave minimal file: ---<--------------------cut here---------------start------------------->--- \documentclass{article} \usepackage{Sweave} \begin{document} <<binom-sim>>= thetas <- seq(0, 1, by=0.001) prior <- rep(1, length(thetas)) / length(thetas) lik <- dbinom(1, 1, thetas) lik.p <- prior * lik post <- lik.p / sum(lik.p)
2006 Jul 17
3
Xen Kernel version issues
I downloaded Xen 3.0.1 and created an RHEL4_u3 domain on it. I need to port our application to virtualization environments like Xen and I found that our application specifically supports kernel version 2.6.9-* while I am using 2.6.16-xenU. Is there a version of Xen available with 2.6.9-* Xen Kernel? _______________________________________________ Xen-users mailing list
2011 Mar 19
2
problem running a function
Dear people, I'm trying to do some analysis of a data using the models by Royle & Donazio in their fantastic book, particular the following function: http://www.mbr-pwrc.usgs.gov/pubanalysis/roylebook/panel4pt1.fn that applied to my data and in the console is as follows: > `desman.y` <- structure(c(3L,4L,3L,2L,1L), .Names = c("1", "2", "3",
2007 Oct 24
1
vectorized mle / optim
Hi the list, I would need some advice on something that looks like a FAQ: the possibility of providing vectors to optim() function. Here is a stupid and short example summarizing the problem: -------------------------------- example 1 ------------ 8< ---------------------- library(stats4) data <- rnorm(100,0,1) lik1 <- function(m, v, data) { N <- length(data) lik.mean <-
2010 Jul 22
1
function return
I am sorry if this question is vague or uninformed. I am just learning R and struggling. I am using the book Hierarchical Modeling and Inference in Ecology and they provide examples of R code. I have the following code from the book but when I run it I don't get any output. I cannot get the values of 'out' to show up. Basically, I just want to see my estimates for b0,
2005 May 23
2
Documentation of S3 and S4 classes, inheritance
I'd like to have a class A that computes a likelihood, and a subclass B that computes the same likelihood by sometimes throws in an additional term (B includes measurement error). So B's likelihood needs to call A's, and then (sometimes) multiply by an additional term. It sounds as if, in the S3 scheme, NextMethod is supposed to do this: like.A <- function(stuff) compute value
2006 Feb 07
1
sampling and nls formula
Hello, I am trying to bootstrap a function that extracts the log-likelihood value and the nls coefficients from an nls object. I want to sample my dataset (pdd) with replacement and for each sampled dataset, I want to run nls and output the nls coefficients and the log-likelihood value. Code: x<-c(1,2,3,4,5,6,7,8,9,10) y<-c(10,11,12,15,19,23,26,28,28,30) pdd<-data.frame(x,y)
2012 Aug 08
1
dimnames in array
Hello, I'm working with an array; I'm trying to make it so that an array of dim(42,2,2) has names whose length corresponds to that of the array, and am hoping someone with experience with this can see what I'm not doing correctly: data11 = array(0,c(41,2,2)) y = lsoda(x0,times,fhn$fn.ode,pars)#This is make.fhn() from colloc infer package# y = y[,2:3]
2007 Mar 06
2
Estimating parameters of 2 phase Coxian using optim
Hi, My name is Laura. I'm a PhD student at Queen's University Belfast and have just started learning R. I was wondering if somebody could help me to see where I am going wrong in my code for estimating the parameters [mu1, mu2, lambda1] of a 2-phase Coxian Distribution. cox2.lik<-function(theta, y){ mu1<-theta[1] mu2<-theta[2] lambda1<-theta[3]
2009 Feb 25
3
indexing model names for AICc table
hi folks, I'm trying to build a table that contains information about a series of General Linear Models in order to calculate Akaike weights and other measures to compare all models in the series. i have an issue with indexing models and extracting the information (loglikehood, AIC's, etc.) that I need to compile them into the table. Below is some sample code that illustrates my
2007 Nov 28
1
Power model in R
Um texto embutido e sem conjunto de caracteres especificado associado... Nome: n?o dispon?vel Url: https://stat.ethz.ch/pipermail/r-help/attachments/20071128/0d193362/attachment.pl
2012 Oct 20
4
Error in integrate(integrand, 0, Inf) : non-finite function value
Dear R users, When I run the code below, I get the error "Error in integrate(integrand, 0, Inf) : non-finite function value". The code works if the function returns only "sum(integ)". However, I want to add "cmh" to it. When I add "cmh" I get that error. I can't figure out why this is happening because my integrate function has nothing to do with
2011 May 23
6
Reading Data from mle into excel?
Hi there, I ran the following code: vols=read.csv(file="C:/Documents and Settings/Hugh/My Documents/PhD/Swaption vols.csv" , header=TRUE, sep=",") X<-ts(vols[,2]) #X dcOU<-function(x,t,x0,theta,log=FALSE){ Ex<-theta[1]/theta[2]+(x0-theta[1]/theta[2])*exp(-theta[2]*t) Vx<-theta[3]^2*(1-exp(-2*theta[2]*t))/(2*theta[2]) dnorm(x,mean=Ex,sd=sqrt(Vx),log=log) }
2005 Nov 11
1
optim not giving correct minima
Hello, I am trying to use optim() on a function involving a summation. My function basically is a thinned poisson likelihood. I have two parameters and in most cases optim() does a fine job of getting the minima. I am simulating my data based on pre specified parameters, so I know what I should be getting. However when my true parameters fall in a particular range, optim() gives