Hello everyone,
I am working on an Econometrics problem with a dataset. My command lines are as follows:
// Set number of observations
eststo clear
set obs 1000
// Generate variables
/// y = beta0 + beta1 * x + u.
g id = _n
g x = runiform()
g u = rnormal()
g y = 3*x + u
// Estimate the model using OLS
reg y x
eststo m1 //store the results
// Replicate each observation by 4
expand 4, gen(dupind)
// Estimate the model using OLS and the new sample
reg y x
eststo m2
// Cluster the standard error
reg y x, cluster(id)
eststo m3
// Show all results
esttab m*, se(3)
log close
but it always reminds me that
"observation number out of range
Observation number must be between 3,010 and 281,474,976,710,654. (Observation numbers are
typed without commas.)"
when it comes to "set obs 1000"
But my dataset contains exactly 3010 data points, and I really don't know where went wrong.
Thanks a lot to any help!
I am working on an Econometrics problem with a dataset. My command lines are as follows:
// Set number of observations
eststo clear
set obs 1000
// Generate variables
/// y = beta0 + beta1 * x + u.
g id = _n
g x = runiform()
g u = rnormal()
g y = 3*x + u
// Estimate the model using OLS
reg y x
eststo m1 //store the results
// Replicate each observation by 4
expand 4, gen(dupind)
// Estimate the model using OLS and the new sample
reg y x
eststo m2
// Cluster the standard error
reg y x, cluster(id)
eststo m3
// Show all results
esttab m*, se(3)
log close
but it always reminds me that
"observation number out of range
Observation number must be between 3,010 and 281,474,976,710,654. (Observation numbers are
typed without commas.)"
when it comes to "set obs 1000"
But my dataset contains exactly 3010 data points, and I really don't know where went wrong.
Thanks a lot to any help!
Comment