Learn R Programming

optimStrat (version 2.0)

vk: Calculate the values of the function f.

Description

Calculate the values of the function f under both the true and the misspecified model.

Usage

vk(x, Beta11, Beta12, Delta12, ak = 1)

Arguments

x

a matrix or data.frame giving the values of the auxiliary variables.

Beta11

a numeric vector of length equal to the number of variables in x giving the coefficients of the trend term in the true superpopulation model (see ‘Details’).

Beta12

a numeric vector of length equal to the number of variables in x giving the exponents of the trend term in the true superpopulation model (see ‘Details’).

Delta12

a numeric vector of length equal to the number of variables in x giving the exponents of the trend term in the assumed superpopulation model (see ‘Details’).

ak

a vector of weights.

Value

A list with two components

fbk

a vector giving the values of the function f under the true model

fdk

a vector giving the values of the function f under the misspecified model

Details

Compute the values of $$f(x_{k}|\beta) = \sum_{j=1}^{J}\beta_{1,j}x_{jk}^{\beta_{1,J+j}}$$ and $$f(x_{k}|\delta) = \sum_{j=1}^{J}\delta_{1,j}x_{jk}^{\delta_{1,J+j}}$$

The coefficients \(\beta_{1,j}\) (\(j=1,\cdots,J\)) are given by Beta11. The exponents \(\beta_{1,j}\) (\(j=J+1,\cdots,2J\)) are given by Beta12. The exponents \(\delta_{1,j}\) (\(j=J+1,\cdots,2J\)) are given by Delta12.

Examples

Run this code
# NOT RUN {
x1<- 1 + sort( rgamma(5000, shape=4/9, scale=108) )
x2<- 1 + sort( rgamma(5000, shape=4/9, scale=108) )
x3<- 1 + sort( rgamma(5000, shape=4/9, scale=108) )
x<- cbind(x1,x2,x3)
vk(x,Beta11=c(1,2,-1),Beta12=c(1,0.75,0.5),Delta12=c(1,0.75,0.5))
# }

Run the code above in your browser using DataLab