R Studio, Linear discriminate analysis,

  1. Much has been made of the deteriorating public infrastructure in the United States. Roads, bridges, sidewalks, etc. need repair all over the country. This Assignment will focus on bridges. Engineers with responsibility for bridges categorize them into one of four categories with respect to risk: Monitor, Schedule Assessment, Schedule Repair/Replacement, or Immediate Repair/Replacement. Monitor means that the bridge is in good condition and is not in danger of failing. Schedule Assessment means that the bridge is showing signs of risk and should be evaluated. Schedule Repair/Replacement means that the bridge has deterioration that presents risk to users. Immediate Repair/Replacement means that the bridge has deterioration that presents risk of failure. In a Word document, create a four-quadrant risk matrix rubric and label the quadrants High Risk/High Impact; High Risk/Low Impact; Low Risk/High Impact; Low Risk/Low Impact. Place each of the four bridge conditions into the quadrant that you believe is appropriate for that condition. You need not have something in each of the four quadrants – your task is to appropriately assess and classify risk based on bridge condition. For each of the four bridge conditions, within the quadrant you selected in the risk matrix, give an example of an issue that may arise if the risk condition is not addressed.
  2. Download the Bridges.csv and the ConditionUnknown.csv files from Course Documents. Import both of these into R Studio with appropriate names. In your Word document, provide evidence that you have imported the data sets.
  3. Build a linear discriminant analysis model using the Bridges.csv data. Document each step in your Word document.
    1. You will need to load the MASS library.
    2. Create the linear discriminant analysis model for the Bridge_Action variable. Use this syntax: BridgeModel <- lda(Bridge_Action~., data=Bridges)
      1. Note that you are creating a data object called BridgeModel, and the data that you are using to create your LDA model is called Bridges (you may have named your training data something other than Bridges when you imported Bridges.csv.
  4. Make predictions for the Condition Unknown bridges using the LDA model you created in step (b) above. Use this syntax: BridgePredict <- predict(BridgeModel, CondUnk)
    1. Note that you are creating a data object called BridgePredict that will apply the BridgeModel LDA object to a data object called CondUnk (you may have named your condition unknown data something other than CondUnk when you imported ConditionUnknown.csv).
  5. Put your LDA predictions into a data frame so that you can read and interpret them. Use this syntax: MyPredictions <- data.frame(BridgePredict$class, round(BridgePredict$posterior, digits=3)*100).
  6. Open the MyPredictions data frame and examine your prediction results. Answer the following in your Word document:
    1. How many bridges do you predict will be in each action category?
    2. What does the round function in step (d) above do to the posterior values in your predictions?
    3. What do the posterior values tell you about each prediction? (Hint: add them up).
    4. Give three ways that a city or county might use the predictions you have generated to manage their infrastructure plan? Give two risks that may arise from use of your predictions.
  7. Make sure that you cite at least five supporting sources beyond the textbook in support of your writing and explanations. Cite correctly in APA format.

Screen shots must be shown for each step even the importing of the data sets. The assignment rubric is below.

Assignment Requirements

1. Each of the four bridge conditions is placed into a quadrant of a risk matrix in a Word document, and within the selected quadrant for each condition, an example of an issue that may arise if the risk condition is not addressed is given.

2. Evidence is provided that the data sets were correctly imported.

3. A linear discriminant analysis model is correctly built and thoroughly documented.

4. Predictions for the Condition Unknown bridges are made using the LDA model.

5. LDA predictions are put into a data frame. Questions (a) through (d) are completely and accurately answered with appropriate supporting sources cited.

6. At least five supporting sources beyond the textbook are cited.