SPSS Missing Data - excel

I checked the missing data in SPSS. There were more missing data than the actual missing cases in a variable.
Screenshot:
For the first variable, it said there are 171784 missing when there are only 127014 missing (I checked using MS Excel). Moreover, there are actually 341272 cases in total but the sum of valid and missing cases in a variable is only 340296. Why are there lots of missing data? Maybe because of this, the mean values I calculated in SPSS are different from those in MS Excel.

Sounds to me like some values were defined as missing values. As opposed to SPSS, when checking in excel these values are counted as valid and influence the calculation of the average, so the results are different for both comparisons.
To check weather there are values defined as missing, take a look at the "missing" column in the variable view of your dataset.
HTH

Have you checked if there are a lot of empty rows in your SPSS Data File that are interpreted as missing data even though they are empty cases. Sometimes importing data to SPSS can cause these problems.

Related

Exporting data set from excel to SPSS: Continuous variables falsely coded as nominal

I am importing a excel data set into SPSS. Unfortunately, a lot of numerical variables are seen as nominal.
Does anyone understand how I need to change the variables in excel so that they are imported correctly?
Thanks for your help and best regards,
Lukas
A possible cause for this is when you have many empty cells in a numeric column in excel, SPSS might think this is a string column by default, even though there are some numbers in the column, all due to this default sub-command:
/DATATYPEMIN PERCENTAGE=95.0
If this indeed is the problem, all you have to do is change to
/DATATYPEMIN PERCENTAGE=100

Replacing numeric values in Excel sheet with text values from other sheet

I am using Surveymonkey for a questionnaire. Most of my data has a regular scale from 0-6, and additionally an "Other" option that people can use in case they choose to not answer the item. However, when I download the data, Surveymonkey automatically assigns a value of 0 to that not-answer category, and it appears this cant be changed.
This leads to me not knowing when a zero in my numeric dataset actually means zero or just participants choosing to not answer the question. I can only figure that out by looking at another file that includes the labels of participants answers (all answers are provided by the corresponding labels, so this datafile misses all non-labeled answers...).
This leads me to my problem: I have two excel files of same size. I would need to find a way to find certain values in one dataset (text value, scattered randomly over dataset), and replace the corresponding numeric values in the other dataset (at the same position in the dataset) with those values.
I thought it would just be possible to find all values and copy paste in the same pattern, but I cannot seem to find a way to do that. I feel like I am missing an obvious solution, but after searching for quite a while I really could not find an answer to my specific question.
I have never worked with macros or more advanced excel programming before, but have a bit of knowledge about programming in itself. I hope I explained this well, I would be very thankful for any suggestions or scripts that could help me out here!
Thank you!
Alex
I don't know how your Excel file is organised, but if it's like the legacy Condensed format, all you should need to do is to select the column corresponding to a given question (if that's what you have), and search and replace all 0 (match entire cell) with the text you want.

SSRS - Lookup field exported shown as #Error

I was wondering if anybody else came across the same problem. It's been bugging me for weeks now.
I have a big table in my report pulling data from DataSet A, one column contains data from DataSet B and is pulled using the followin:
=Lookup(Fields!Date.Value, Fields!Date.Value, Fields!Sales.Value, "Sales")
Running report shows no errors, all numbers are displayed. However when I export the report to any format (tried CSV, EXCEL, PDF) the value from lookup column comes as #Error (CSV, PDF) or #VALUE! (EXCEL).
Looking for any help on the internet proved to be unsuccessful. Is there anybody who stumpled upon the same problem?
If you can lookup the data field from another dataset properly, it should not be the issue on lookup() function. I've also tested in my local environment, the data can be rendered after exporting. In this scenario, I suggest pay attention to the data type and data length. Can you show the sample data in your BIDS/SSDT?
Turns out it was the fact that I was returning more than one row from the other dataset (not always but in some cases yes). Normally I would create calculate field (different currencies and sales value) and sum them in the report. SSRS didn't have problem showing the first value by default but export functionality failed, since I did't SUM() rows that were find. I change the Dataset then to calculate the values after currency conversion and them wrapped it in another select statement to make sure I only have one for my Date.Value

Stata tab over entire dataset

In Stata is there any way to tabulate over the entire data set as opposed to just over one variable/column? This would give you the tabulation over all the columns.
Related - is there a way to find particular values in Stata if one does not know which column they occur in? The output would be which column and row they are located in or at least which column.
Stata does not use row and column terminology except with reference to matrices and vectors. It uses the terminology of observations and variables.
You could stack or reshape the entire dataset into one variable if and only if all variables are numeric or all are string. If that assumption is incorrect, then you would need to convert numeric variables to string, at least temporarily, before you could do that. I guess wildly that you are only interested in blocks of variables that are all either numeric or string.
When you say "tabulate" you may mean the tabulate command. That has limits on the number of rows and/or columns it can show that might bite, but with a small amount of work list could be used for a simple table with many more values.
tabm from tab_chi on SSC may be what you seek.
For searching across several variables, you could automate a loop.
I'd say that if this is a felt need, it is quite probable that you have the wrong data structure for at least some of what you want to do and should reshape. But further details might explode that.

How can I set "999" as the DEFAULT missing value in SPSS/PASW?

I'm importing a very large dataset into SPSS. Many fields in the dataset contain a "999" value, indicating a missing value. I want to instruct SPSS to view them as such. However, default each variable in SPSS is set to having "no missing values". In variable view, you have to define "999" as being the "discrete missing value" for each variable. With hundreds of variables though, this is a lot of work:
Therefore: is there a way to define "discrete missing value 999" as the default missing value for each variable on import? This would save me a lot of work, but I cannot find the answer online (I only get tutorials as to how define 999 as the missing value for each variable seperately, as I am doing now).
Your help is be greatly appreciated!
It is not possible to make a value 999 by default as user missing value.
I advise you to use the syntax. There is a command MISSING VALUES. It allows to define values as user missing for several variables in one go. Try the following commands for example:
MISSING VALUES all (999).
MISSING VALUES V1 to V99 (999).

Resources