Displaying 5 results from an estimated 5 matches for "ll0".
Did you mean:
ll
2007 Dec 11
1
R computing speed
...beta<-numeric(nx*ny)
negll<- function(beta,y,xi)
{
beta[rest]<-0
beta[(((c.base-1)*nx)+1):(c.base*nx)]<-0
lli <- y * (xi%*%matrix(beta,nx,ny) - log ( apply(exp(
xi%*%matrix(beta,nx,ny)) ,1,sum ) ) )
lli<-lli*w
-sum(lli)
}
pi<- apply((y*w),2,mean)/mean(w)
ll0 <- (t(pi)%*%log(pi))*sum(w)
result<-c( optim(par = rep(0,nx*(ny)), fn = negll, y=y, xi=xi,
hessian=T, method=method),
list(varnames=xi.names, rest=rest, nx=nx, ny=ny,
npar=nx*(ny-1)-length(rest), ll0=ll0, pi=pi, xi=xi,
n.obs=n.obs,c.base=c.base,w=w))
result$par <- result$par[-(((...
2012 Feb 09
2
Lattice 3d coordinate transformation
......)
{
add.line <- trellis.par.get("add.line")
zz <- surf[[packet.number()]]
clines <- contourLines(zz,nlevels = nlevels)
colreg <- heat.colors(max(unlist(lapply(clines,function(ll) ll$level))))
for (i in 2:length(clines)) {
ll <- clines[[i]]
ll0 <- clines[[i-1]]
m <- ltransform3dto3d(rbind(ll$x-.5, ll$y-.5, zlim.scaled[1]),
rot.mat, distance)
m0 <- ltransform3dto3d(rbind(ll0$x-.5, ll0$y-.5,
zlim.scaled[1]), rot.mat, distance)
xvec <- c(m0[1,],m[1,ncol(m):1])
yvec <- c(m0[2,],m[2,ncol(m):1])
pane...
2016 Apr 02
0
BCa Bootstrap confidence intervals
...ion
# mult: sample squared multiple correlation in full model
# n: sample size
# Returns:
# confidence interval
z <- qnorm(1 - alpha/2)
mult0 <- mult - part^2
zr <- log((1 + part)/(1 - part))/2
a <- (mult^2 - 2*mult + mult0 - mult0^2 + 1)/(1 - part^2)^2
se <- sqrt(a/(n - 3))
LL0 <- zr - z*se
UL0 <- zr + z*se
LL <- (exp(2*LL0) - 1)/(exp(2*LL0) + 1)
UL <- (exp(2*UL0) - 1)/(exp(2*UL0) + 1)
CI <- c(LL, UL)
return(CI)
}
CIsemipartcorr(.05, .3638, .7803, 22)
Thanks for your time,
2007 Jul 29
1
behavior of L-BFGS-B with trivial function triggers bug in stats4::mle
...ax=15, xhalf=6)
-sum(stats::dpois(y, lambda=ymax/(1+x/xhalf), log=TRUE))
## fix one parameter to get 1D profile
fit2 <- mle(ll, fixed=list(xhalf=6))
profile(fit2)
## same again with method="L-BFGS-B"
fit3 <- mle(ll, fixed=list(xhalf=6),method="L-BFGS-B")
profile(fit3)
ll0 <- function(zzz) {
ymax <- 15
xhalf <- 6
-sum(stats::dpois(y, lambda=ymax/(1+x/xhalf), log=TRUE))
}
## try mle() with all-fixed parameters with various methods ...
methods = eval(formals(optim)$method)
sapply(methods,
function(m) {
-logLik(mle(ll, start=list(ymax=15,...
2007 Aug 13
1
[Fwd: behavior of L-BFGS-B with trivial function triggers bug in stats4::mle]
...xhalf=6)
-sum(stats::dpois(y, lambda=ymax/(1+x/xhalf), log=TRUE))
## fix one parameter to get 1D profile
fit2 <- mle(ll, fixed=list(xhalf=6))
profile(fit2)
## same again with method="L-BFGS-B"
fit3 <- mle(ll, fixed=list(xhalf=6),method="L-BFGS-B")
profile(fit3) ## BUG
ll0 <- function(zzz) {
ymax <- 15
xhalf <- 6
-sum(stats::dpois(y, lambda=ymax/(1+x/xhalf), log=TRUE))
}
## try mle() with all-fixed parameters with various methods ...
methods = eval(formals(optim)$method)
sapply(methods,
function(m) {
-logLik(mle(ll, start=list(ymax=15,xhalf=6),...