as.weight {plink}R Documentation

Calibration Weights

Description

This function facilitates the creation of either a set of quadrature weights or weights based on a set of theta values for use in the function plink

Usage

as.weight(n=40, theta1 = NULL, weight1 = NULL, theta2 = NULL, weight2 = NULL, 
  normal.wt = FALSE, ...)

Arguments

n number of quadrature points to use
theta1 vector of theta values for the set of TO item parameters (i.e. the item parameters that will not be transformed)
weight1 vector of weights corresponding to theta1. They must sum to one.
theta2 vector of theta values for the set of FROM item parameters (i.e. the item parameters that will be transformed)
weight2 vector of weights corresponding to theta2. They must sum to one.
normal.wt if TRUE and weight1 is NULL, the weights for theta1 and theta2 will be computed to correspond to the densities from a normal distribution.
... further arguments passed to other methods

Details

If no theta values are supplied, n normal quadrature points and weights will be computed using the gauss.quad.prob function from the statmod package. Additional arguments can be passed to this function to change the distribution used to compute the quadrature weights.

If values are only supplied for theta1, the values for theta2 will equal those of theta1. If values are supplied for theta1 and theta2, the length of the two vectors must be equal.

If no weights are supplied, and normal.wt=FALSE, the values for weight1 and weight2 will be equal to 1/m for m theta values. If no weights are supplied, and normal.wt=TRUE, the values for weight1 and weight2 will be equal to the normal densities corresponding to the theta values.

If values are only supplied for weight1, the values for weight2 will equal those of weight1. If values are supplied for weight1 and/or weight2, the length of the vector(s) should be equal to the length of the theta vector(s). If values are supplied for weight1 or weight2, normal.wt will be ignored.

See Kolen & Brennan (2004) for more information on calibration weights.

Value

Returns a list of length two. The first list element is an n x 2 matrix of theta values corresponding to theta1 and theta2. The second list element is an n x 2 matrix of weights corresponding to weight1 and weight2.

Note

When normal.wt equals TRUE, theta1 and theta2 are standardized to determine normal density weights

Author(s)

Jonathan P. Weeks weeksjp@gmail.com

References

Kolen, M. J., & Brennan, R. L. (2004) Test Equating, Scaling, and Linking. New York: Springer

See Also

plink, gauss.quad.prob

Examples

# Create a set of 40 (default) theta values and weights using quadrature
wt <- as.weight()

# Create a set of 20 theta values and weights using quadrature
wt <- as.weight(20)

# Create a set of 40 quadrature points and weights using a uniform distribution
wt <- as.weight(dist="uniform")

# Create weights for a set of random normal theta values
wt <- as.weight(theta1=rnorm(100))

# Create an object with equal interval theta values and normal density weights
wt <- as.weight(theta1=seq(-4,4,0.05), normal.wt=TRUE)


[Package plink version 0.1-1 Index]