SPSS, Stata and Minitab worksheets
-
- Posts: 19
- Joined: Thu Sep 03, 2009 1:39 pm
SPSS, Stata and Minitab worksheets
I've got the teaching version of MLwiN, Can I load my own data (in SPSS)?
Last edited by MLwiN-User on Tue Oct 13, 2009 1:30 pm, edited 1 time in total.
-
- Posts: 16
- Joined: Tue Oct 13, 2009 9:36 am
Re: SPSS, Stata and Minitab worksheets
No, data input and output for the teaching version of MLwiN is limited to specially marked MLwiN worksheets, so you will not be able to load your SPSS files using the teaching version.
-
- Posts: 19
- Joined: Thu Sep 03, 2009 1:39 pm
Re: SPSS, Stata and Minitab worksheets
Are there any issues I should be aware of when opening my Stata/SPSS/Minitab files with MLwiN v2.1?
-
- Posts: 16
- Joined: Tue Oct 13, 2009 9:36 am
Re: SPSS, Stata and Minitab worksheets
If you have any categorical variables for which there are no observations in some of the categories, see 'How do I get rid of an unneeded dummy variable?' below
-
- Posts: 19
- Joined: Thu Sep 03, 2009 1:39 pm
How do I get rid of an unneeded dummy variable?
I entered a categorical variable into my model as an explanatory variable, and although there are no observations in one of the categories of this variable, a dummy variable for this category was still included in the model. How can I remove it without removing all the dummy variables for this categorical variable?
-
- Posts: 16
- Joined: Tue Oct 13, 2009 9:36 am
How do I get rid of an unneeded dummy variable?
When you enter a categorical variable as an explanatory variable (or as the response of a multinomial model), MLwiN will enter in all the categories of the explanatory variable even if some categories have no observations. The situation where some categories of a variable have no observations may occur if the variable had some categories with no observations in the original dataset you imported it from (perhaps a Stata or SPSS worksheet), or if you have recoded the variable so that some categories are combined (for example if you recode so that all observations in Category 3 are now in Category 2), or if you have deleted all records in that category of the variable from the dataset.
An unneeded dummy explanatory variable can be removed from the model as described in the FAQ How can I constrain fixed parameters to zero? (http://www.cmm.bristol.ac.uk/MLwiN/tech ... tml#fixed0)
Alternatively, before entering it into the model, you can update the category labels as described in the FAQ How do I update the category labels for a categorical variable? (http://www.cmm.bristol.ac.uk/MLwiN/tech ... #catlabels)
Now when you enter the variable into a model (whether as an explanatory variable or as the response of a multinomial model), only the new set of categories will be entered: any of the categories which had no observations will no longer be included. Note that if after following this procedure you recode the variable so that again some categories have no observations, or alter the data in any other way so that this happens, the categories with no observations will not automatically disappear: you will need to update the category labels again.
A final possibility, if you know the code of the category which has no observations, is to use CATN to remove just the category/categories with no observations. How to do this is described in the FAQ How do I update the category labels for a categorical variable? (http://www.cmm.bristol.ac.uk/MLwiN/tech ... #howcatvar) alternatively see p18 of the Command Manual (http://www.cmm.bristol.ac.uk/MLwiN/down ... uals.shtml). Since this removes the category from the variable, it will mean both that no dummy for that category is included when the categorical variable is entered as an explanatory variable and that the category will not be included when the categorical variable is used as the response of a multinomial model.
An unneeded dummy explanatory variable can be removed from the model as described in the FAQ How can I constrain fixed parameters to zero? (http://www.cmm.bristol.ac.uk/MLwiN/tech ... tml#fixed0)
Alternatively, before entering it into the model, you can update the category labels as described in the FAQ How do I update the category labels for a categorical variable? (http://www.cmm.bristol.ac.uk/MLwiN/tech ... #catlabels)
Now when you enter the variable into a model (whether as an explanatory variable or as the response of a multinomial model), only the new set of categories will be entered: any of the categories which had no observations will no longer be included. Note that if after following this procedure you recode the variable so that again some categories have no observations, or alter the data in any other way so that this happens, the categories with no observations will not automatically disappear: you will need to update the category labels again.
A final possibility, if you know the code of the category which has no observations, is to use CATN to remove just the category/categories with no observations. How to do this is described in the FAQ How do I update the category labels for a categorical variable? (http://www.cmm.bristol.ac.uk/MLwiN/tech ... #howcatvar) alternatively see p18 of the Command Manual (http://www.cmm.bristol.ac.uk/MLwiN/down ... uals.shtml). Since this removes the category from the variable, it will mean both that no dummy for that category is included when the categorical variable is entered as an explanatory variable and that the category will not be included when the categorical variable is used as the response of a multinomial model.
Re: SPSS, Stata and Minitab worksheets
Hi, I'm an American graduate student in a statistics class this summer who is looking at SPSS, STATA and Minitab for my course this summer. I found this article (http://ameristaliareport.com/index/the- ... -vs-stata/) which says that one of the advantages of SPSS is that it has the added dropdown menus, so I'm curious if anyone here might know the way to do the upload from Minitab into SPSS through the drop-down menu? If not, I could do a Minitab upload into either STATA or SPSS if someone knows the code for me. I would love the help!
-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: SPSS, Stata and Minitab worksheets
As far as I am aware SPSS cannot directly import Minitab worksheets and Minitab cannot directly export SPSS data files, so you would need to convert the file via a third piece of software. You will probably get the best translation using StatTransfer (http://www.stattransfer.com/) which is software dedicated to translating data from one form to another. Alternatively you could use software that can read Minitab files and write SPSS format data. Examples of these are MLwiN which can read .mtw and write .sav files, and the R foreign package (http://cran.r-project.org/web/packages/ ... index.html) which can read .mtp files and write .sav files. The second of these is the only free option that I am aware of, however it is also command only.