search for: dinv

Displaying 6 results from an estimated 6 matches for "dinv".

Did you mean: dinh
2005 Nov 03
0
problems with pan(): Indizierung ausserhalb der Grenzen = subscript out of bounds
...dim(pred)[2] > xcol [1] 1 #xcol = 1 , using all number of cols of pred[] > zcol <- c(1) # = 1 , number of cols to use > y.ncol <- dim(y)[2] > n.zcol <- length(zcol) > prior <- list(a=y.ncol, + Binv=diag(y.ncol), + c=n.zcol, + Dinv=diag(n.zcol)) > prior $a [1] 15 $Binv [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [1,] 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [2,] 0 1 0 0 0 0 0 0 0 0 0 0 0...
2004 Feb 06
1
Savitzky-Golay smoothing -- an R implementation
...pe="o") # convolve(...) T2 <- T2[(fc+1):(length(T2)-fc)] } #----------------------------------------------------------------------- # *** PseudoInvers of a Matrix *** # using singular value decomposition # pinv <- function (A) { s <- svd(A) # D <- diag(s$d); Dinv <- diag(1/s$d) # U <- s$u; V <- s$v # A = U D V' # X = V Dinv U' s$v %*% diag(1/s$d) %*% t(s$u) } #-----------------------------------------------------------------------
2005 May 26
1
PAN: Need Help for Multiple Imputation Package
...ed out at end. > sim <- read.xport('c:\\xptds.dat') > > int <- rep(1,1200) > y <- cbind(sim$MIY1,sim$TCOV1) > subj <- sim$ID > pred <- cbind(int, sim$TIME, sim$GROUP) > > xcol <- 1:3 > zcol <- 1 > prior <- list(a=2,Binv=4,c=2,Dinv=4) > result <- pan(y,subj,pred,xcol,zcol,prior,seed=13579,iter=1000) Error: subscript out of bounds By the way, I also received the same error message when I tried to include intercept and time in Zcol, a matrix for random effect specification. I used command “ zcol <- 1:2”. Does anyb...
2005 Aug 31
0
Imputation using Pan in R
...10,10,10,10) > pred <- cbind(int=rep(1,40), + dummy1=rep(c(1,0,0,0),10), + dummy2=rep(c(0,1,0,0),10), + dummy3=rep(c(0,0,1,0),10), + dummy4=rep(c(0,2,4,6),10)) > xcol <- 1:4 > zcol <- c(1,5) > a <- array (2,dim=c(2,2)) > prior <- list(a=1,Binv=1,c=2,Dinv=a) > result <- pan(y,subj,pred,xcol,zcol,prior,seed=25679,iter=5000) > result$y [1] 5 8 NaN 10 2 NaN NaN NaN 10 10 8 NaN NaN 10 4 NaN 2 8 NaN [20] 9 NaN NaN NaN NaN 8 6 NaN 5 6 NaN NaN NaN 10 2 NaN NaN 6 8 [39] NaN 2 > [[alternative HTML version...
2007 Sep 24
0
longitudinal imputation with PAN
...quot;Girls")) impht.data$visit <- factor (impht.data$visit) impht.data$code <- factor (impht.data$code) y <- impht.data$htmiss subj <- impht.data$code pred <- cbind (impht.data$age, impht.data$sex, impht.data$visit) xcol <- 1:3 zcol <- 1 prior <- list(a=1, Binv=1, c=1, Dinv=1) ht1 <- pan(y, subj, pred, xcol, zcol, prior, seed=13579, iter=1000) code sex visit age ht htmiss 1 2 1 4.87 105 105 1 2 2 5.86 109.6 1 2 3 6.88 116.4 116.4 1 2 4 7.72 121.2 121.2 1...
2011 Jun 21
0
R crash when using pan for multiple imputation
...                                                #col with random effect in pred  prior <- list( a=ncol(y),                                           #non-informative prior                      Binv= diag( rep(1,ncol(y) ) ) ,                      c= ncol(y) * length(zcol) ,                      Dinv= diag( rep(1 ,ncol(y)*length(zcol) ) )                       )                       imput1 <-  pan(y,subj,pred,xcol,zcol,prior,seed= 13579 ,iter= 1000) #run first imputation ...after 30 minutes: CRASH (R ends automatically, Rgui is closed without log) Is there a way to identify the sourc...