Lab Practice Nov 4
Part 1
- Open QlikView file we worked on Monday
- On the AGST vs Price Scatter Plot add Trendline Linear for the Expression Only(Price).
Select: Show formula and R^2. This is a BEST FIT LINE - Linear Regression Model for
Independent Variable AGST
Part 2 - Summary for AGST independent variable for Training Data
Create a new sheet AGST_Training_Summary
Add Straight Table. Call it: AGST Training Data. Dimensions: Year and AGST
Expressions:
- $(=LINEST_M(Price, AGST)) - This is A coefficient for the Linear Regression Model.
Label: A, select No Totals
- $(=LINEST_B(Price, AGST)) - This is B coefficient for the Linear Regression Model. Label:
B, Select No Totals
- Only(Price), Label: ActualPrice
- A*Only(AGST)+B, Label: PredictedPrice
- Avg(Price), Label: AveragePrice
- (Only(Price)-(A*Only(AGST)+B))*(Only(Price)-(A*Only(AGST)+B)), Label: SSE_LR and in Total
Mode Select Sum of Rows
- (Only(Price)-$(=Avg(Price)))*(Only(Price)-$(=Avg(Price))), Label: SST
and in Total
Mode Select Sum of Rows
- $(=LINEST_R2(Price, AGST)), Label R^2, Select Expression Total
Add statistics box with Average Price
Copy AGST vs Price Scatter Plot to this sheet as well. Make sure you have Linear and
Average Trendlines with Show Equation and R^2 for Linear
Create combo chart Line and Bar with Dimension: Year and
Expressions: Only(Price) as a Bar Chart and
(0.6351*Only(AGST)-3.4178) as a Line Chart
Document PARTIAL Results
here
This completes the Training Data part and building the model. Next step is to TEST our
model. Name this file WineQualityTraining
Part 3 - Testing the Model
- Open new file. Call it WineQualityTesting
- Load wine AND wine_test data
- Make sure you click RELOAD
- Rename Main Sheet to be - AGST_Testing_Summary
- Create Combo Chart. Dimension: Year. Expressions: Only(Price) as a Bar Chart and
(0.6351*Only(AGST)-3.4178) as a Line Chart
- Create Straight Table. Dimension: Year
and the following Expressions
Lab Assignment - Friday
- Perform Similar Analysis for Harvest Rain, Winter Rain, Age and France Population independent variables
- Document Results here
- Compare R^2 values. Which model is the best model?