1.1. Simple Regression in Excel (Excel 2010).

Size: px
Start display at page:

Download "1.1. Simple Regression in Excel (Excel 2010)."

Transcription

1 .. Simple Regression in Excel (Excel 200). To get the Data Analysis tool, first click on File > Options > Add-Ins > Go > Select Data Analysis Toolpack & Toolpack VBA. Data Analysis is now available under Excel s Data tab. Open the Excel Worksheet GPAvsGMAT.xls and select Data Analysis > Regression. Then fill out the popup window as shown below, specifying GPA as the Y variable and GMAT as the X variable: This will produce the output: SUMMARY OUTPUT Regression Statistics Multiple R R Square Adjusted R Square Standard Error Observations 20 ANOVA df SS MS F Significance F Regression E-05 Residual Total Coefficients Standard Error t Stat P-value Lower 95% Upper 95% Lower 95.0% Upper 95.0% Intercept GMAT E b. Simple Regression in Excel (Excel 2007).

2 To get the Data Analysis tool in Excel 2007, first click on the Office button (top left corner), and select Excell options > Add-Ins > Go > Select Data Analysis Toolpack & Toolpack VBA. Data Analysis is now available under Excel s Data tab..c. Simple Regression in Excel (Excel 2003). Open the Excel Worksheet GPAvsGMAT.xls and select Tools > Data Analysis > Regression. Then fill out the popup window the same way as shown for Excel 200. In case Data Analysis is not found under Tools, add it under Tools > Add-Ins..2. Simple Regression in IBM SPSS..2.. Start IBM SPSS Statistics 20, available from the Statistics menu of the standard COB PC configuration. Select File > Open > Data. Select to see Files of type: Excel. Open GPAvsGMAT.xls. Confirm that variable names should be read from the first row of data Select Analyze > Regression > Linear. Specify Dependent=GPA, Independent=GMAT. 2

3 Select OK. This will produce the following output: Regression Variables Entered/Removed b Variables Entered Variables Removed Method GMAT a. Enter a. All requested variables entered. b. Dependent Variable: GPA Summary R R Square Adjusted R Square Std. Error of the Estimate.809 a a. Predictors: (Constant), GMAT ANOVA b Sum of Squares df Mean Square F Sig. Regression (a) Residual Total a. Predictors: (Constant), GMAT b. Dependent Variable: GPA Unstandardized Coefficients Coefficients a Standardized Coefficients B Std. Error Beta t Sig. (Constant) GMAT a. Dependent Variable: GPA 3

4 .3. Simple Regression in MINITAB..3.. Start MINITAB 6 for Windows, available from the Statistics menu of the standard COB PC configuration. Select File > Open Worksheet. Select to see Files of type: Excel. Open GPAvsGMAT.xls Select Stat > Regression > Regression. Select OK. This will produce the output: Regression Analysis: GPA versus GMAT The regression equation is GPA = GMAT Predictor Coef SE Coef T P Constant GMAT S = R-Sq = 65.4% R-Sq(adj) = 63.5% Analysis of Variance Source DF SS MS F P Regression Residual Error Total

5 .4. Simple Regression in SAS 9.3 Open SAS 9.3. IN the SAS environment, you will need to create a library called BUSI6220 and convert the data file GPAvsGMAT.xls from Excel format to SAS format..4.. Double-click the yellow libraries icon. Right-click > New. Type BUSI6220 as the name of the new library, and an appropriate folder location in the Path box. Click OK. Your new library should now appear as a new yellow icon Import the Excel data file by selecting File > Import Data > MS Excel > Next. Find your file and select it. Select BUSI6220 as the destination library and GPAVSGMAT as the Member name Select Solutions > Analysis >Interactive Data Analysis. Select SAS data file BUSI6220.GPAVSGMAT. Click Open Select Analyze > Fit. Specify GPA as the Y variable and GMAT as the X variable. Click OK. 5

6 The analysis results will appear as shown below. GPA = GMAT Response Di st r i but i on: Nor mal Li nk Funct i on: I dent i t y Equat i on GPA = GMAT 3.5 G P A GMAT Cur ve Degr ee( Pol ynomial) DF Paramet r i c Regr essi on Fi t Er r or Mean Squar e DF Mean Squar e R- Squar e F St at Pr > F <. 000 Summar y of Fi t Mean of Response Root MSE R- Squar e Adj R- Sq Sour ce Er r or C Tot al DF 8 9 Anal ysi s of Vari ance Sumof Squar es Mean Squar e F St at Pr > F <. 000 Sour ce GMAT DF Sumof Squar es Type III Tests Mean Squar e F St at Pr > F <

7 .5b. Find the LSE solution for b 0, b, using Excel Solver (Excel 200)..5.. Start by setting up an Excel worksheet where the squared residuals are calculated. Use arbitrary values for b 0 and b (the arbitrary solution b 0 =-.00 and b =0.0 is shown below) Fill in the rest of the worksheet, and place the sum of squared residuals in one of the cells: To add solver in your Excel, follow similar steps as those involved in adding Data Analysis capabilities. Solver will then be available under Excel s Data tab..5b.3. Set up a linear program using Solver (Data > Solver). Click Solve and keep the solution. The results will appear in cells B23 (for b 0 ) and B24 (for b ). Solver will replace the arbitrary values for b0 and b with the LSE solution values. 7