R/ccov_np_regression.R

Defines functions ccov_np_regression

## File Name: ccov_np_regression.R
## File Version: 0.141

ccov_np_regression <- function(x, y, xgrid, bwscale=1.1, smooth=TRUE, score=NULL)
{
    N <- length(x)
    if (smooth){
        y <- stats::ksmooth( x=x, y=y, bandwidth=bwscale*N^(-1/5),
                            x.points=xgrid, kernel='normal')$y
    } else {
        a1 <- stats::aggregate(y, list(score), mean, na.rm=TRUE)
        y <- a1[,2]
    }
    return(y)
}

Try the sirt package in your browser

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

sirt documentation built on May 29, 2024, 8:43 a.m.