-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathQ2-Model 4 Code
13 lines (13 loc) · 1.37 KB
/
Q2-Model 4 Code
1
2
3
4
5
6
7
8
9
10
11
12
13
*No variables with high VIF scores included in model;
*Predictors with VIF scores >= 10 were not included;
*Includes Ames training * test sets along with no log transformations conducted on predictors
*Partitioned training 60% test 40%, LASSO CV-AIC;
ods graphics on;
proc glmselect data=ames_train2 seed=1 plots(stepAxis=number)=(criterionPanel ASEPlot CRITERIONPANEL);
partition fraction(test=0.4);
class MSZoning Street Alley LotShape LandContour Utilities LotConfig LandSlope Neighborhood Condition1 Condition2 BldgType HouseStyle RoofStyle RoofMatl Exterior1st Exterior2nd MasVnrType ExterQual ExterCond Foundation BsmtQual BsmtCond BsmtExposure BsmtFinType1 BsmtFinType2 Heating HeatingQC CentralAir Electrical KitchenQual Functional FireplaceQu GarageType GarageFinish GarageQual GarageCond PavedDrive PoolQC Fence MiscFeature SaleType SaleCondition;
model logSalePrice = MSSubClass LotFrontage LotArea OverallQual OverallCond YearBuilt YearRemodAdd MasVnrArea BsmtFinSF1 BsmtFinSF2 BsmtUnfSF TotalBsmtSF FirstFlrSF SecondFlrSF LowQualFinSF GrLivArea BsmtFullBath BsmtHalfBath FullBath HalfBath BedroomAbvGr KitchenAbvGr TotRmsAbvGrd Fireplaces GarageYrBlt GarageCars GarageArea WoodDeckSF OpenPorchSF EnclosedPorch ThreeSsnPorch ScreenPorch PoolArea MiscVal MoSold YrSold / selection=elasticnet(choose=CV stop=AIC) CVdetails ;
output out=results10 p=predict;
run;
quit;
ods graphics off;