Sample size, significance testing and suitability of data
-
- Posts: 19
- Joined: Thu Sep 03, 2009 1:39 pm
Sample size, significance testing and suitability of data
What sample size should I use in MlwiN?
Re: Sample size, significance testing and suitability of data
For more info on Sample sizes go to: http://www.cmm.bristol.ac.uk/learning-t ... ples.shtml
-
- Posts: 19
- Joined: Thu Sep 03, 2009 1:39 pm
Re: Sample size, significance testing and suitability of data
How can I calculate confidence intervals in MLwiN?
Re: Sample size, significance testing and suitability of data
You can calculate the confidence intervals by multiplying the standard errors of the parameters by the appropriate amount using the Calculate window (available from the Data Manipulation menu) or the CALC command, or in a different package of your choice, or using a pocket calculator. The standard errors can be found in the Equations window displayed in brackets after the parameter estimate. If you have many parameters, you may find it quicker to use a macro. There is a macro available on the CMM website which will calculate the z-ratios and confidence intervals. If you want to write your own, then information on where the standard errors are stored in the worksheet can be found here: http://www.cmm.bristol.ac.uk/MLwiN/tech ... html#where
If you are using MCMC, then instead of confidence intervals based on standard errors and the assumption that the sampling distribution of each parameter is Normal, you may want confidence intervals derived from quantiles of the chains of parameter estimates. These can be obtained by selecting Trajectories from the Model menu, and then in the window that appears clicking on the graph for one of the parameters (and clicking Yes in answer to the question that appears). This brings up the MCMC diagnostics window which contains some information based on the chain of estimates for that parameter. The information you want is at the bottom, in the second row of the Summary Statistics section. This gives the 2.5%, 5%, 50%, 95% and 97.5% quantiles. If you want different quantiles or if you want to calculate the quantiles for many parameters at once without having to click on each graph individually to bring up the relevant window, then again you might want to write a macro. The MCMC manual ('MCMC Estimation in MLwiN') gives details of where to find the stored chains of parameter estimates and how to split the one long variable containing this information into a separate variable for each parameter (p58-59).
If you are using MCMC, then instead of confidence intervals based on standard errors and the assumption that the sampling distribution of each parameter is Normal, you may want confidence intervals derived from quantiles of the chains of parameter estimates. These can be obtained by selecting Trajectories from the Model menu, and then in the window that appears clicking on the graph for one of the parameters (and clicking Yes in answer to the question that appears). This brings up the MCMC diagnostics window which contains some information based on the chain of estimates for that parameter. The information you want is at the bottom, in the second row of the Summary Statistics section. This gives the 2.5%, 5%, 50%, 95% and 97.5% quantiles. If you want different quantiles or if you want to calculate the quantiles for many parameters at once without having to click on each graph individually to bring up the relevant window, then again you might want to write a macro. The MCMC manual ('MCMC Estimation in MLwiN') gives details of where to find the stored chains of parameter estimates and how to split the one long variable containing this information into a separate variable for each parameter (p58-59).