I am trying to construct fitted values and confidence intervals for these predictions. Constructing the fitted values works fine, but trying to compute the variance-covariance matrix leads to type mismatch error.
I have the covariates saved in a matrix X_D. I extracted the variance-covariance matrix of coefficients from a regression and saved it with the tempname `varcov_D'. The coefficients themselves are saved in the matrix `b_all_D'.
When I run
I receive the output
X_D[48,14]
symmetric __00000R[14,14]
As best as I can tell, the content of both matrices is numeric, although some columns in X_D are either 0 or 1.
Running
Then gives the error
type mismatch
r(109);
When I previously ran
everything went smoothly.
I am quite at my wit's end. Does anybody have an idea what the issue is or might be?
I have the covariates saved in a matrix X_D. I extracted the variance-covariance matrix of coefficients from a regression and saved it with the tempname `varcov_D'. The coefficients themselves are saved in the matrix `b_all_D'.
When I run
Code:
matrix list X_D matrix list `varcov_D'
X_D[48,14]
symmetric __00000R[14,14]
As best as I can tell, the content of both matrices is numeric, although some columns in X_D are either 0 or 1.
Running
Code:
matrix var_y_D = X_D * `varcov_D'
type mismatch
r(109);
When I previously ran
Code:
matrix fit_D = X_D * (`b_all_D')'
I am quite at my wit's end. Does anybody have an idea what the issue is or might be?