4. Propuesta
4.1 Percepción actual de los clientes
4.1.1 Matriz Dofa
You can produce very fancy figures and graphs in SPSS. Producing fancy figures and graphs is beyond the scope of this handout. Instructions on producing figures and graphs can be found in SPSS Help under Topics → Contents → Building Charts and Editing Charts, as well as in the SPSS Tutorials under Creating and Editing Charts. Note, that both the Help and Tutorials you need to have Internet access. Also, last time I tried the doing a tutorial is didn’t work.
This handout covers the basic commands for creating simple graphs using the Legacy Dialogs under Graphs versus the newer methods using the Chart Builder .
Bar Charts
The easiest way to produce simple bar charts is to use the Bar Chart option with the
Frequencies... command. See Frequency Tables (& Bar Charts) for Categorical Variables. You can only produce only one bar chart at a time using the Bar command.
current former never Smoking status 60.0% 50.0% 40.0% 30.0% 20.0% 10.0% 0.0% Pe rc e n t current former never Smoking status 60.0% 50.0% 40.0% 30.0% 20.0% 10.0% 0.0% Pe rc e n t yes no Family history of heart attack
1. Choose Graphs and then Legacy Dialogs from the menu bar. 2. Choose Bar...
3. Choose Simple, Clustered, or Stacked
4. Choose what the data in the bar chart represent (e.g., summaries for groups of cases). 5. Choose Define
6. Select a variable from the variable list on the left and the click on the arrow next to the Category axis.
7. Choose what the bars represent (e.g., number of cases or percentage of cases) 8. Choose OK
Histograms
The easiest way to produce simple histograms is to use the Histogram option with the
Frequencies... command. See Descriptive Statistics (& Histograms) for Numerical Variables. You can produce only one histogram at a time using the Histogram command.
50 40
30 20
10
Body mass index 120 100 80 60 40 20 0 Fr e q u e n c y Mean =26.2366 Std. Dev. =4.8667 N =1,000 Boxplots
The easiest way to produce simple boxplots is to use the Boxplot option with the Explore... command. See Descriptive Statistics (& Boxplots) By Groups for Numerical Variables. You can produce only one boxplot at a time using the Boxplot command.
diabetic impaired fasting
glucose normal
ADA diabetes status 400 200 0 S e ru m f a s ti n g gl u c o s e 785 880 684 77 673 1. Choose Graphs and then Legacy
Dialogs from the menu bar. 2. Choose Boxplot...
3. Choose Simple or Clustered 4. Choose what the data in the
boxplots represent (e.g., summaries for groups of cases). 5. Choose Define
6. Select a variable from the variable list on the left and then click on the arrow next to the Variable box.
7. Select the variable from the variable list that defines the groups and then click on the arrow next to Category Axis. 8. Choose OK
1. Choose Graphs and then Legacy Dialogs from the menu bar
2. Choose Histogram... 3. Select a variable from the
variable list on the left and then click on the arrow in the middle of the window.
4. Choose Display normal Curve if you want a normal curve
superimposed on the histogram. 5. Choose OK
Normal Probability Plots. To produce Normal probability plots: 1. Choose Analyze from the menu bar
2. Choose Descriptive Statistics.
3. Choose Q-Q Plots... to get a plot of the quantiles (Q-Q plot) or choose P-P Plots... to get a plot of the cumulative proportions (P-P plot)
4. Select the variables from the source list on the left and then click on the arrow located in the middle of the window.
5. Choose Normal as the Test Distribution. The Normal distribution is the default Test Distribution. Other Test Distributions can be selected by clicking on the down arrow and clicking on the desired Test distribution.
6. Choose OK
SPSS will produce both a Normal probability plot and a detrended Normal probability plot for each selected variable. Usually the Q-Q plot is the most useful for assessing if the distribution of the variable is approximately Normal.
600 400 200 0 -200 Observed Value 250 200 150 100 50 0 -50 E x p e c ted No rm al V a lu e
Normal Q-Q Plot of Serum fasting glucose
50 40 30 20 10 Observed Value 40 30 20 10 Ex p e c te d N o rm a l Va lu e
Error Bar Plot. To produce an error bar plot of the mean of a numerical variable (or the means for different groups of subjects):
1. Choose Graphs and then Legacy Dialogs from the menu bar. 2. Choose Error Bar...
3. Choose Simple or Clustered
4. Choose what the data in the error bars represent (e.g., summaries for groups of cases). 5. Choose Define
6. Select a variable from the variable list on the left and then click on the arrow next to the Variable box.
7. Select the variable from the variable list that defines the groups and then click on the arrow next to Category Axis.
8. Select what the bars represent (e.g., confidence interval, ±standard deviation, ±standard error of the mean)
9. Choose OK
Error Bar Plot
diabetic impaired fasting
glucose normal
ADA diabetes status 300 250 200 150 100 50 M e an + - 2 S D S e ru m fa st in g g lu c o s e A bar chart of the mean with error bars can be made using the commands for making a bar chart
ADA diabetes status
diabetic impaired fasting glucose normal M e a n S e ru m f a s ti n g gluc o s e 300 200 100 0 Error bars: +/- 2 SD
1. Choose Graphs and then Legacy Dialogs from the menu bar.
2. Choose Bar... 3. Choose Simple
4. Choose Summaries for groups of cases 5. Choose Define
6. Select a variable from the variable list on the left and the click on the arrow next to the Category axis (e.g., diabetes status) 7. Choose Other statistic (e.g. mean). By
default the mean will be selected. 8. Choose a variable for the Variable that
you the want to display the mean (or Other statistic).
9. Choose Options
10. Select Display error bars
11. Select Standard deviation, and enter 2 for the Multiplier
12. Choose Continue 13. Choose OK
Scatter Plot. To produce a scatter plot between two numerical variables: 50 40 30 20 10
Body mass index 140 120 100 80 60 40 20 0 H D L ch o les te ro l HLD cholesterol vs BMI
Adding a linear regression line to a scatter plot. To add a linear regression (least-squares) line to a scatter plot of two numerical variables:
50 40
30 20
10
Body mass index 140 120 100 80 60 40 20 0 H D L ch o les te ro l HLD cholesterol vs BMI R Sq Linear = 0.121 Additional options:
o Choose Mean under Confidence Intervals (in the Properties window) to add a prediction
interval for the linear regression line to the scatter plot or
o Choose Individual under Confidence Intervals to add a prediction interval for individual
observations to the scatter plot.
7.Click on the ``X'' in the upper right hand corner of the Chart Editor window, or choose File and then Close to return to the Viewer window.
1. Choose Graphs and then Legacy Dialogs on the menu bar.
2. Choose Scatter/Dot... 3. Choose Simple 4. Choose Define
5. Y Axis: Select the y variable you want from the source list on the left and then click on the arrow next to the y axis box.
6. X Axis: Select the x variable you want from the source list on the left and then click on the arrow next to the x axis box.
7. Choose Titles...
8. Enter a title for the plot (e.g., y vs. x).
9. Choose Continue 10.Choose OK
1. While in the Viewer window double click on the scatter plot. The scatter plot should now be
displayed in a window titled Chart Editor.
2. Choose Elements.
3. Choose Fit Line at Total. (A line should be added to the plot, because the next 2 steps are the default options.
4. Choose Linear (in the Properties window)
5. Choose Apply 6. Choose Close
Adding a Loess (scatter plot) smooth to a scatter plot. To add a Loess smooth to a scatter plot of two numerical variables:
50 40
30 20
10
Body mass index 140 120 100 80 60 40 20 0 H D L ch o les te ro l HLD cholesterol vs BMI
Stem-and-leaf Plot. To produce stem-and-leaf plot: 1. Choose Analyze on the menu bar
2. Choose Descriptive Statistics 3. Choose Explore...
4. Dependent List: To select the variables you want from the source list on the left, highlight a variable by pointing and clicking the mouse and then click on the arrow located next to the dependent list box. Repeat the process until you have selected all the variables you want. 5. Choose Plots...
6. Choose Stem-and-leaf from the Descriptive box. Note the option may already be selected if the little box is not empty.
7. Choose None from the Boxplot box 8. Choose Continue
9. Choose Plots for the Display option 10.Choose OK
Severity of Illness Index Stem-and- Leaf Plot
Frequency Stem & Leaf 2.00 4 . 34 7.00 4 . 6688899 10.00 5 . 0001112344 3.00 5 . 568 1.00 Extremes (>=62) Stem width: 10.00
Each leaf: 1 case(s)
1. While in the Viewer window double click on the scatter plot. The scatter plot should now be
displayed in a window titled Chart Editor.
2. Choose Elements. 3. Choose Fit Line at Total.
The next two steps (4. & 5.) may be already selected
4. Choose Loess (in the Properties window). Default options for % of points to fit (50%) and kernel (Epanechnikov) are usually appropriate options.
5. Choose Apply (in the Properties window).
6. Choose Close
7. Click on the ``X'' in the upper right hand corner of the Chart Editor window, or choose File and then Close to return to the Viewer.