% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{sigijj12C}
\alias{sigijj12C}
\title{Unbiased estimate of sigma_ijj1^2 and sigma_ijj*sigma_ij1j1 using C routine}
\usage{
sigijj12C(x, y)
}
\arguments{
\item{x}{a vector}

\item{y}{a vector}
}
\value{
A list containing two variables sigmaijj12 and ssijj1 in it.
      The sigmaijj12 variable gives an unbiased estimate of \eqn{\sigma_{ijj1}^2}.
      The ssijj1 variable gives an unbiased estimate of \eqn{\sigma_{ijj} \sigma_{ij_1j_1}}.
}
\description{
This function calculates an unbiased estimate of \eqn{\sigma_{ijj1}^2} using the u-statisitic of vectors
\eqn{x=(x_1, x_2, ..., x_{ni})} and \eqn{y=(y_1, y_2, ..., y_{ni})},
where \eqn{X_j} and \eqn{Y_j} are correlated, but \eqn{X_j} and \eqn{Y_{j1}} are independent if \eqn{j \ne j1}.
Note: \deqn{\sum_{k1 \ne k2 \ne k3 \ne k4} (x_{k1}-x_{k2})(y_{k1}-y_{k2}) (x_{k3}-x_{k4}) (y_{k3}-y_{k4})}
is an unbiased est. of \eqn{4 n_i (n_i-1)(n_i-2)(n_i-3) [E(X_{ijk}-\mu_{ij}) u_{ij1k}) ]^2}.
This function is much faster if fun.sigijj12
}
