
But given that they didn't change this when they went to dynamic memory allocation, there must be some reason why it is difficult or impossible to do that. Hello Statalisters, Is there a command to extract the dimensions of a matrix, something like this : local ncolcolnumb(mymat) display ncol' I've tried the help and internet, but did not find anything satisfying. I happen to like the Compact Window Layout. You can also save (and then load) named preference sets using the menu EditPreferences. Stata remembers its settings the next time it runs. You can resize or even close some of these windows. Why Stata requires you to explicitly put an upper limit on the size of matrices, I do not know. The Properties window immediately below that, introduced in version 12, displays properties of your variables and dataset. Modern versions of Stata have eliminated that and memory is allocated dynamically, increasing or decreasing as needed. In earlier versions of Stata you also had to set the amount of memory you wanted allocated to Stata by the operating system (though there was a default amount if you didn't specify it explicitly). I do not know why Stata even requires you to set a matrix size upper limit. The histogram command can be used to make a simple histogram of mpg. Let’s use the auto data file for making some graphs. I don't believe you need to do anything to restrict the size of the matrix to only what is actually needed: this is automatic. This module will introduce some basic graphs in Stata 12, including histograms, boxplots, scatterplots, and scatterplot matrices. But a given m x n matrix will still only require storage for m x n data elements (plus some fixed overhead). When you set the matrix size you are actually setting the maximum size allowed for any matrix. My understanding is that when creating a matrix Stata will only use the actual size matrix needed for the information and calculations at hand. I look forward to hearing from you! Thank you very much in advance. Therefore, I would like to reduce the matrix size to the min level to save MLE iteration, but I do not know the real matrix size needed. I am currently working on some regression that require hours for one iteration of the MLE and I figured out that the size of the matrix is one of the reasons. If this is the case, is there anyway that Stata will automatically adjust its matrix size according to the need? Going back to the OLS example, if my OLS regression only needs Matrix size 100, but I do not know it and I set the matsize = 11000, is there any way that I will make Stata to adjust automatically according to the real need of the regression (i.e. Therefore, it will take a much longer time for you to run a simple OLS regression if you set matsize 11000. you actually only need matrix size 100 to run the regression). In general, if you set the matrix size = 11000, the Stata will perform using the size regardless of your actual needed matrix size (e.g. I have two questions on the Stata Matrix Size.ġ.
