Here is a script that demonstrates how the covariance of the estimates is computed using your sample of data.
Names Default to Here( 1 );
// make example into data table
dt = New Table( "Example for CI in Regression",
Add Rows( 20 ),
New Column( "X",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[7.9, 13, 10.8, 11.6, 10.5, 11.1, 8.8, 11.9, 11.1, 9, 7.4, 6.9, 9.4, 7.2,
8.8, 7.1, 12.4, 12.1, 15.1, 14.2]
)
),
New Column( "Y",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[115, 154, 156, 182, 124, 157, 129, 181, 164, 122, 100, 86.2, 118.9,
94.2, 114.3, 104.9, 181.5, 166.1, 166.1, 157.7]
)
)
);
// perform regression analysis
fls = dt << Fit Model(
Y( :Y ),
Effects( :X ),
Personality( "Standard Least Squares" ),
Emphasis( "Minimal Report" ),
Run(
:Y << {Summary of Fit( 1 ), Analysis of Variance( 1 ),
Parameter Estimates( 1 ), Plot Actual by Predicted( 0 ),
Plot Residual by Predicted( 0 ), Plot Studentized Residuals( 0 ),
Plot Effect Leverage( 0 ), Box Cox Y Transformation( 0 )}
)
);
// obtain model matrix x
xx = fls << Get X Matrix;
// compute covariance matrix of parameter estimates
cov est = Inverse( xx` * xx );
// display covariance matrix
New Window( "Estimates Covariance",
Outline Box( "Covariance of Estimates",
Matrix Box( cov est )
)
);
The first part of the script produces a data table with the data that you first provided. I use the Fit Least Squares platform to get the regression model matrix but it could also be made using matrix operations. Then it computes and displays the covariance matrix.
You should recognize this matrix as the first argument in the Vec Quadratic() function in the column formula that you saved.
The covariance matrix is the inverse of the information matrix for the parameters, which, in turn, is the Transpose( XX ) * XX, where XX is the model matrix. XX has a column for every term in the linear model. In your example, the frist column is 1 to estimate the intercept (constant response) and the second column is the X data column from the data table (your predictor). If you included the quadratic term, the third column of XX would be X^2, and so on. The response column Y is not involved.
I hope that this example illustrates what the covariance matrix is and where it comes from.