Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: RE: Matsize and Estimation of the Variance Matrix in a Regression
From
Joe Canner <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: RE: Matsize and Estimation of the Variance Matrix in a Regression
Date
Wed, 4 Sep 2013 15:24:38 +0000
Alex,
I'm no -areg- expert, but I would suggestion that if you want get more traction with this question, you should probably provide additional information, including:
1. The complete specification of your model
2. A description of the variables in your model (e.g., if categorical, how many levels)
3. Why you are increasing the -matsize- in the first place
I suspect that the model has some intrinsic problems that need to be fixed (perhaps something similar to what you have suggested) which will probably take care of the -matsize- issue (which is probably more of a symptom than a cause), but we would need to know more before offering a solution.
Regards,
Joe Canner
Johns Hopkins University School of Medicine
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Alex MacKay
Sent: Wednesday, September 04, 2013 9:58 AM
To: [email protected]
Subject: st: Matsize and Estimation of the Variance Matrix in a Regression
Dear statalist,
I have run into an issue that when I increase the matsize, it can
cause a regression that previously ran with no warnings to return:
"Warning: variance matrix is nonsymmetric or highly singular."
It estimates the exact same coefficients across the board. I've put
the log for the first coefficient below. Notice the Warning in advance
of the output. With the larger matsize (10000), it does not estimate
standard errors, and the model degrees of freedom are zero.
I am using the areg command to absorb the variable product_id. Is it
possible that Stata is trying to generate a number of fixed effects
that exceed 800, the original matsize, and decides to drop the
product_id dummy variables? This may allow it to estimate standard
errors. If so, I think it should be reported as a bug.
Alex
(Note: I'm reposting in a way that may more clearly identify the
issues, now that I am familiar with replying).
//Matsize = 10000
note: 2599.week omitted because of collinearity
note: 597.retailer_id omitted because of collinearity
note: 866.retailer_id omitted because of collinearity
note: 877.retailer_id omitted because of collinearity
note: 9101.retailer_id omitted because of collinearity
note: 54.state_id omitted because of collinearity
Warning: variance matrix is nonsymmetric or highly singular
note: 3997.retailer_id omitted because of collinearity
note: 4955.retailer_id omitted because of collinearity
note: 7005.retailer_id omitted because of collinearity
note: 7599.retailer_id omitted because of collinearity
Linear regression, absorbing indicators Number of obs = 597
F( 0, 45) = .
Prob > F = .
R-squared = 0.9256
Adj R-squared = 0.8695
Root MSE = 0.2950
(Std. Err. adjusted for 46 clusters in clusterID)
------------------------------------------------------------------------------
| Robust
ln_price | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
treatment | -4.044072 . . .
. .
//Matsize == 800
note: 2599.week omitted because of collinearity
note: 597.retailer_id omitted because of collinearity
note: 866.retailer_id omitted because of collinearity
note: 877.retailer_id omitted because of collinearity
note: 9101.retailer_id omitted because of collinearity
note: 54.fips omitted because of collinearity
note: 3997.retailer_id omitted because of collinearity
note: 4955.retailer_id omitted because of collinearity
note: 7005.retailer_id omitted because of collinearity
note: 7599.retailer_id omitted because of collinearity
Linear regression, absorbing indicators Number of obs = 597
F( 49, 45) = .
Prob > F = .
R-squared = 0.9256
Adj R-squared = 0.8695
Root MSE = 0.3085
(Std. Err. adjusted for 46 clusters in clusterID)
------------------------------------------------------------------------------
| Robust
ln_price | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
treatment | -4.044072 3.152507 -1.28 0.206
-10.39355 2.305404
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/