R/genprobexact.R

Defines functions genprobexact

Documented in genprobexact

genprobexact <-
function(    Z,
                        blockvar = NULL,
                        clustvar = NULL) {

    desmat.out <- desmat.sanitize(Z,blockvar,clustvar)
    
    Z <- desmat.out$Z
    clustvar <- desmat.out$clustvar
    blockvar <- desmat.out$blockvar

    probs <- ave(Z, blockvar)
    probs.index <- c(1:length(probs))
    probsclus <- probs[match(clustvar, probs.index)]
    return(probsclus)
	}

Try the ri package in your browser

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

ri documentation built on May 2, 2019, 6:51 a.m.