search for: pzleneg

Displaying 1 result from an estimated 1 matches for "pzleneg".

2010 Nov 03
3
optim works on command-line but not inside a function
...- function(theta, z, l){ epow <- exp(-(z+l*theta)) result <- 1/(1+epow) result } #as IRT.oneOverP but now for IRT.pZL IRT.pZLepos <- function(theta, z, l){ epow <- exp(-(z+l*theta)) result <- (1+epow) result } #as IRT.oneOverPneg but now for IRT.pZL IRT.pZLeneg <- function(theta, z, l){ epow <- exp(z+l*theta) result <- (1+epow) result } #The loglikelihood of IRT, but now expressed in terms of z and l IRT.llZetaLambda <- function(params, t, X){ pos<- sum(t * log(IRT.pZL( X,params[1],params[2]) )) neg<- sum( (1-t)...