# NOT RUN {
data(dataHigherMoments)
# build an instrument gp = (G - mean(G))(P - mean(P)) using the internalIV() function
# with G = "x3" meaning G(X) = X^3
eiv <- internalIV(formula = y ~ X1 + X2 + P, endoVar = "P", G ="x3", IIV = "gp",
data = dataHigherMoments)
# }
Run the code above in your browser using DataLab