search for: loglik2

Displaying 4 results from an estimated 4 matches for "loglik2".

Did you mean: loglik
2013 Apr 01
2
Timing of SET_VECTOR_ELT
...he list elements. (It is my habit to use "xyz2" for the name of the R object and "xyz" for the pointer to its contents.) PROTECT(means2 = allocVector(REALSXP, nvar)); means = REAL(means2); PROTECT(u2 = allocVector(REALSXP, nvar)); u = REAL(u2); PROTECT(loglik2 = allocVector(REALSXP, 2)); loglik = REAL(loglik2); PROTECT(rlist = mknamed(VECSXP, outnames)); Can I assign the individual elements into rlist using SET_VECTOR_ELT at this point, or do I need to wait until the end of the program, after I've filled in means[i], u[i], etc.? I like...
2006 Feb 15
1
Multiple comparison for circular data
Hi All, Does anyone know how to compare the means of several circular-data samplings? Any related websites, references and softwares? Thanks Xiaohua -- Xiaohua Dai, Dr. [[alternative HTML version deleted]]
2012 Oct 29
0
why isn't integrate function working in a likelihood
...the first part of the likelihood function haz<-(time*exp(Z*p[3]))*p[1] ll2<-vector("numeric",length(1:20)) for (s in 1:20){ integrand<-function(x) x^(del[s]+1/p[2]-1)*exp(-x/p[2])*exp(-x*haz[s])/(gamma(1+1/p[2])*p[2]^(1/p[2])) ll2[s]<-log(integrate(integrand,0,Inf)$value) } loglik2<-as.vector(ll2) #second part of the likelihood function lik<-sum(loglik1+loglik2) -lik } initial<-c(1,1,1) t<-nlm(ll,initial) Error in integrate(integrand, 0, Inf) : non-finite function value ll(c(1,1,1)) [1] 26.65748 -- View this message in context: http://r.789695.n4.nabble....
2002 Apr 22
3
glm() function not finding the maximum
Hello, I have found a problem with using the glm function with a gamma family. I have a vector of data, assumed to be generated by a gamma distribution. The parameters of this gamma distribution are estimated in two ways (i) using the glm() function, (ii) "by hand", using the optim() function. I find that the -2*likelihood at the maximum found by (i) is substantially larger than that