R/get.Phi.R

get.Phi <-
function(Q,obs.idx){
    if(length(obs.idx)<nrow(Q)){
        Q11=Q[obs.idx,obs.idx]
        Q22=Q[-obs.idx,-obs.idx]
        Q21=Q[-obs.idx,obs.idx]
        L=t(chol(Q22))
        V=solve(L,Q21)
        Phi=Q11-t(V)%*%V
    }else{
        Phi=Q
    }
}

Try the rwc package in your browser

Any scripts or data that you put into this service are public.

rwc documentation built on May 2, 2019, 3:34 p.m.