How to perform regression calibration with only one variable in Stata? I am attempting to perform regression calibration on some test data to familiarize myself with the idea behind it. I don't have much of a stats background. The method rcal in Stata seems to be what I am looking for, however I am having trouble when trying to regress on only one variable.
In the following example, there are two independent variables (x1,x2) with an error in x2 in the rcal section.
Ordinary regression with no measurement error

gen x1 = uniform() 
gen x2 = uniform()
gen y = 1+2*x1+3*x2
regress y x1 x2

This outputs the coefficients of x1 and x2, 2 and 3 respectively, with _cons=1
Now if I was to add some error on x2, and perform a regression calibration

gen a1 = x2 + .3*invnorm(uniform())
matrix suu = 0.1
rcal(y=x1) (w1:a1), suuinit(u)

This outputs an estimate of the coefficients of x1, and w1. Thats good.
However, if I only have one variable

gen x1 = uniform()
gen y = 1+2*x1
regress y x1

This outputs the coefficient of x1. I can however not use the rcal method now if I was to add noise on the x1 variable. The rcal method seems to require at least one variable without error for its calculations.
e.g., the following is not syntactically correct

rcal(y) (w1:a1), suuinit(u)
 
I can't seem to figure out how to only use only one independent variable. I'm thinking there might be a mistake in my understanding of regression calibration.
 A: I'll try to help with what I understand.
The purpose of the method is to correct for biased coefficients and 
incorrect standard errors, consequence of measurement error in your independent variables (the why of this can be reviewed in
any basic text - econometric, e.g.). That is, you're interested in the 
coefficient of some independent variable x but instead, you have w, which is x combined with some measurement error u. You may
have one or several of these imperfect measurements sometimes called
replicates: w_1, w_2, ..., w_k.
The proposed method works in different ways depending on the availability
of data:


*

*There is a single replicate and the variance for the measurement error
variance must be provided (the suuinit() option).

*More than one replicate is available and suuinit() is only optional.

*Maybe others.
The gist is that the unobserved variable x is estimated using its correponding replicates.
An example for the Stata command is:
rcal (y=z1 z2 z3) (x1: w11 w12 w13) (x2: w21 w22 w23)

The Z vector contains independent variables assumed to have no measurement
error. x1 and x2 are of interest to the researcher, but only imperfect 
measurements (w11 w12 w13) and (w21 w22 w23) are available. Those are three
replicates for each x_i. Your interest lies in the case
where there is no Z vector, then you should type:
rcal (y=) ...

help rcal has a typo in the syntax declaration (version 2.2.0  07may2003). The correct version is available
in the command's Stata Journal article.
Read, if you haven't:
The Stata Journal (2003)
3, Number 4, pp. 361-372
The regression-calibration method for fitting
generalized linear models with additive
measurement error, by Hardin et al.
and
http://www.stata.com/merror/
Below an example that works:
clear all
set more off

set obs 1000
set seed 1064

gen x1 = uniform()
gen x2 = uniform()
gen x3 = uniform()
gen err = invnorm(uniform())
gen y = 1+2*x1+3*x2+4*x3+err

* simulate measurement error covariate
gen a1 = x3 + .3*invnorm(uniform())
gen a2 = x3 + .3*invnorm(uniform())

* estimate x1, x2 & w3 using regression calibration
rcal (y=x1 x2) (w3: a1 a2), bstrap
rcal (y=x1 x2) (w3: a1 a2), bstrap saving("rcalboot.txt") replace
eret list

* display and use a covariance error matrix
mat list e(suu)
mat suu = ( .1)

* Two different ways    
rcal (y=x1 x2) (w3: a1 a2)
rcal (y=) (w1:a1), suuinit(suu)

Note: rcal is a user-written command by Hardin, Schmiediche and Carroll, from Stata Journal 3, Number 4, pp. 361-372.
