similar to: problem in using optim

Displaying 20 results from an estimated 7000 matches similar to: "problem in using optim"

2010 Apr 22
2
time difference
Hi, Does anyone know how to take a time difference when the format of the time is as 13:22:23.586? I am trying to take the difference of time between stock transactions and need to keep the three decimal places for seconds. I have tried *diff(strptime(x, "%H:%M:%S.000))*, but apperantly that doesn't work. Carol Gao [[alternative HTML version deleted]]
2010 May 24
2
How to set parameters constraints in a function?
Dear R list, I have a function specifying my log-likelihood, and now I need to set the constraint that *alpha > kappa*, could anyone help me with setting this in my function? the function is defined as follows: mll <- function(param){ n <- length(x) psi <- numeric(n) psi[1] <- 1.0 a0 <- exp(param[1]); a1 <-exp(param[2]); b1 <- exp(param[3]); *alpha *<-
2010 Apr 24
1
Adding new column variable to a existing spreadsheet
Hi, I've got a csv format of file. There are seven columns of variables all together, and I've used the diff() function to take the differences between the variables in one column. Now I want to add the differences as the 8th column variable to the csv file. Is there any way that I can do this? Thanks in advance. Carol Gao [[alternative HTML version deleted]]
2010 Apr 29
1
time zone convert
Hi there, I've got a column vector in a csv file as follows, and I need to add 11 hours to each of them. Is there a way that I can do it? (The actual file size is much bigger than this.) Time "01-DEC-2008 00:00:28.611" "01-DEC-2008 00:00:43.155" "01-DEC-2008 00:01:06.677" "01-DEC-2008 00:01:06.677" "01-DEC-2008 00:01:06.677" "01-DEC-2008
2012 Feb 06
1
MLEs using optim
I am trying to use the optim command to get the MLEs for a number of parameters based on some data. Is it possible to write a program that maximizes the likelihood and stores the parameters (many times)? I need to do this a lot of times, each time the data will be updated with more entries (rows). I need to see how the new data is affecting the previous parameter estimates of the model. What is
2006 Aug 24
1
Optim question
This is a very basic question, but I am a bit confused with optim. I want to get the MLEs using optim which could replace the newton-raphson code I have below which also gives the MLEs. The function takes as input a vector x denoting whether a respondent answered an item correctly (x=1) or not (x=0). It also takes as input a vector b_vector, and these are parameters of test items (Rasch estimates
2010 May 01
1
select subset of data according to date range
Dear R lists, Would anyone help me with setting data frames according to the date? X.RIC Date.G. Time.G. GMT.Offset Type Price Volume Time 1 QAN.AX 01-DEC-2008 00:00:28.611 11 Trade 2.28 105 2008-12-01 11:00:28.611 2 QAN.AX 01-DEC-2008 00:00:43.155 11 Trade 2.28 250 2008-12-01 11:00:43.155 3 QAN.AX 01-DEC-2008 00:01:06.677 11
2007 Jul 21
1
Gamma MLE
Hello, I was asked to try the following code on R, gamma.mles function (xx,shape0,rate0) { n<- length(xx) xbar<- mean(xx) logxbar<- mean(log(xx)) theta<-c(shape0,rate0) repeat { theta0<- theta shape<- theta0[1] rate<- theta0[2] S<- n*matrix(c(log(rate)-digamma(shape)+logxbar,shape/rate-xbar),ncol=1) I<- n*matrix(c(trigamma(shape),-1/rate,-1/rate,shape/rate^2),ncol=2)
2009 Dec 10
1
MLE for a t distribution
Given X1,...,Xn ~ t_k(mu,sigma) student t distribution with k degrees of freedom, mean mu and standard deviation sigma, I want to obtain the MLEs of the three parameters (mu, sigma and k). When I try traditional optimization techniques I don't find the MLEs. Usually I just get k->infty. Does anybody know of any algorithms/functions in R that can help me obtain the MLEs? I am especially
2012 Aug 02
1
finding the MLEs of IG parameters by EM-Alorithm
Dear all I'm trying to caculate the MLEs for parameters of Inverse Gaussian distribution (in a k-sample problem with common mean) by using EM-Algorithm. I found some package for EM-Algorithm that are useful for missing or incomplete data and are not helpful for solving my problem. (Exactly, the problem is: Let Xij, i=1,..,k , j=1,...,ni, be a random sample from IG(?,?i). So the
2009 Nov 21
2
Fw: Re: title problem
It seems that there is a problem in displaying subtitle in general, independently from multi-plot display. when I do plot (c(1,2,3), c(9,8,7), type = "l") title(main = "Main title", sub ="Sub title",cex.main=2, cex.sub = 2) subtitle doesn't get displayed > --- On Sat, 11/21/09, David Winsemius <dwinsemius at comcast.net> > wrote: >
2001 Nov 20
1
using samba to serve the whole tree of home directories
I'm trying to use samba to serve a number of home directories to other samba Linux clients on my network. ie. I have a set of client machines that want to use the /home directory that my samba server will provide I thought I could set up a share that goes something like this [homedirs] path = /home writable = true On a client machine, I smbmount //myserver/homedirs
2008 Nov 04
1
Is SIPPEER curcalls working for you ?
Hi, In this thread http://lists.digium.com/pipermail/asterisk-users/2008-October/219592.html , I wondered whether SIPPEER curcalls was working. I could test this anew today. Here are my findings : Alice, Bob and Carol ar all using SIP Phones. Whenever Alice is calling Bob, - if Carol is calling Alice, SIPPEER(Alice:curcalls) equals 0 - if Carol is calling Bob, SIPPEER(Bob:curcalls) equals 1
2004 Apr 07
1
ZIB models
I attempted to contact Drew Tyre, but the email I have for him is no longer in service. Hopefully someone can help. I'm using obs.error in R to model turtle occupancy in wetlands. I have 4 species and 20 possible patch and landscape variables, which I've been testing in smaller groups. > zib.out<-obs.error(y=painted,m=numvis,bp=zvars,pcovar=7) I get the following error
2008 May 16
0
How to determine sensible values for 'fnscale' and 'parscale' in optim
Dear R-help, I'm using the 'optim' functions to minimise functions, and have read the documentation, but I'm still not sure how to determine sensible values to use for the 'fnscale' and 'parscale' options. If I have understood everything correctly, 'fnscale' should be used to scale the objective function, so that for example if the default is
2008 Jun 24
1
Hessian in box-constraint problem - concern OPTIM function
Hello all useRs, I am using the OPTIM function with particular interest in the method L-BFGS-B, because it is a box-constraint method. I have interest in the errors estimates too. I make: s.e. <- sqrt( diag( solve( optim(...,method='L-BFGS-B', hessian=TRUE)$hessian ))) but in help say: "Note that this is the Hessian of the unconstrained problem even if the box constraints
2012 Jul 20
3
function for inverse normal transformation
Hi, What is the function for inverse normal transformation? Thanks, Carol [[alternative HTML version deleted]]
2007 Jan 20
2
Conditional pluralize without the number
Hi. Assume you have an array of person names. I want to generate results in my view that look like this: Abby is your friend or Abby, Bob, and Carol are your friends. So I''d like to say: <%= friends.to_sentence %> <%= pluralize(friends.count, "is") %> your <%= pluralize(friends.count, "friend") %> But because pluralize puts in the
2009 Sep 01
2
numerical summaries across variables.
Hi Every one, I have a dataframe "class" with "name", "sex", "age", "height", "Weight". if i caluclate summary statistics with the below code numSummary(class[,c("Height", "Weight")], groups=class$Name, statistics=c("mean", "sd", "quantiles"), quantiles=c(0, .25,.5,.75,1)) iam getting
2009 Oct 09
2
plot the same types of graphics on the same R graphic device
Hi, How to plot the same types of graphics on the same R graphic device? Suppose that we want to plot a vector y against x (using plot for instance). How is it possible to plot y against x for different values of these two vectors on the same device so that the plots could be compared? Cheers, Carol [[alternative HTML version deleted]]