search for: b_vector

Displaying 2 results from an estimated 2 matches for "b_vector".

Did you mean: bp_vector
2006 Aug 24
1
Optim question
...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 in this case) For example, here is how my current function operates. > rasch.max(c(1,1,0,0), c(-1,.5,0,1)) theta is about 0.14 , se 1.063972 I'm not quite sure how to accomplish the same thing using optim. Can anyone offer a sugges...
2010 Jun 02
1
Use apply only on non-missing values
I have a function that I am currently using very inefficiently. The following are needed to illustrate the problem: set.seed(12345) dat <- matrix(sample(c(0,1), 110, replace = TRUE), nrow = 11, ncol=10) mis <- sample(1:110, 5) dat[mis] <- NA theta <- rnorm(11) b_vector <- runif(10, -4,4) empty <- which(is.na(t(dat))) So, I have a matrix (dat) with some values within the matrix missing. In my real world problem, the matrix is huge, and most values are missing. The function in question is called derivs() and is below. But, let me step through the inefficient...