Use the dataframe Q6. Fit a model predicting 'Donation.Amount' from LIFETIME_MIN_GIFT_AMT and OVERLAY_SOURCE significance of the...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Use the dataframe Q6. Fit a model predicting 'Donation.Amount' from LIFETIME_MIN_GIFT_AMT and OVERLAY_SOURCE significance of the predictor OVERLAY_SOURCE Note: The predictor OVERLAY_SOURCE be done by using drop1(). Check the previous activity and make sure to specify the correct test when using drop1(). (no interaction). Copy/paste the p-value of the test for If it is <2.2e-16 enter 0. is a categorical variable so the test should `{r} data=(Q6) M6<-1m (Donation.Amount~LIFETIME_MIN_GIFT_AMT+OVERLAY_SOURCE, data-Q6) visualize_model (M6) drop1 (M6, test="chisq") summary (M6) 公 X #12: Use dataframe Q12. First set the seed number to be 320. Split the dataframe Q12 into a training sample (75%) and holdout sample (25%). Build a predictive logistic regression model predicting 'Buy' from all remaining predictors in Q12 (no interactions), choosing as your final model the one suggested by the one standard deviation rule (make sure to use 320 for the seed number). Fit the model on the training sample, then report its misclassification rate on your holdout sample. The answer should be a number between 0 and 100. Note: Make sure to set the random number seed to 320 when splitting the data into traning, holdout sample and building a predictive logistic regression model. #11: Use the Q11 dataframe. You want a 'good' model predicting 'wins' from all remaining variables in Q11 (without interactions). Perform the 'all possible' approach, which produces a list of models with whose AICS are within 4 of the overall lowest AIc of all considered models. From this list of models, identify the predictors in the model with the FEWEST predictors (it could be the case your list has only one model). Redo the 'al1 possible' approach considering just those predictors ALONG WITH all two-way interactions between them to produce yet another list of models (your list might only have one). Report the AIC of the model at the top of this list, i.e., the one with the LOWEST AIC. Note: do not add ANY extra arguments (e.g., nbest or nvmax) to any of the commands. ` {r} data=(Q11) #10: Use dataframe Q10. Fit a logistic regression model predicting Smoking from Weight and SpouseRace with an interaction. Copy/paste the p-value of the interaction. If it is <2.2e-16 enter 0. Note: The predictor SpouseRace is a categorical variable so the test should be done by using drop1(). Check the previous activity and make sure to specify the correct test when using drop1(). `{r} data=(Q10) M10<-glm(Smoking-Weight*SpouseRace, data=Q10,family="binomial") visualize_model (Q10) drop1 (M10, test="chisq") Single term deletions Model: Smoking - Weight * SpouseRace Df Deviance AIC LRT Pr(>Chi) <none> 401.33 421.33 Weight:SpouseRace 4 406.96 418.96 5.632 0.2284 Use the dataframe Q6. Fit a model predicting 'Donation.Amount' from LIFETIME_MIN_GIFT_AMT and OVERLAY_SOURCE significance of the predictor OVERLAY_SOURCE Note: The predictor OVERLAY_SOURCE be done by using drop1(). Check the previous activity and make sure to specify the correct test when using drop1(). (no interaction). Copy/paste the p-value of the test for If it is <2.2e-16 enter 0. is a categorical variable so the test should `{r} data=(Q6) M6<-1m (Donation.Amount~LIFETIME_MIN_GIFT_AMT+OVERLAY_SOURCE, data-Q6) visualize_model (M6) drop1 (M6, test="chisq") summary (M6) 公 X #12: Use dataframe Q12. First set the seed number to be 320. Split the dataframe Q12 into a training sample (75%) and holdout sample (25%). Build a predictive logistic regression model predicting 'Buy' from all remaining predictors in Q12 (no interactions), choosing as your final model the one suggested by the one standard deviation rule (make sure to use 320 for the seed number). Fit the model on the training sample, then report its misclassification rate on your holdout sample. The answer should be a number between 0 and 100. Note: Make sure to set the random number seed to 320 when splitting the data into traning, holdout sample and building a predictive logistic regression model. #11: Use the Q11 dataframe. You want a 'good' model predicting 'wins' from all remaining variables in Q11 (without interactions). Perform the 'all possible' approach, which produces a list of models with whose AICS are within 4 of the overall lowest AIc of all considered models. From this list of models, identify the predictors in the model with the FEWEST predictors (it could be the case your list has only one model). Redo the 'al1 possible' approach considering just those predictors ALONG WITH all two-way interactions between them to produce yet another list of models (your list might only have one). Report the AIC of the model at the top of this list, i.e., the one with the LOWEST AIC. Note: do not add ANY extra arguments (e.g., nbest or nvmax) to any of the commands. ` {r} data=(Q11) #10: Use dataframe Q10. Fit a logistic regression model predicting Smoking from Weight and SpouseRace with an interaction. Copy/paste the p-value of the interaction. If it is <2.2e-16 enter 0. Note: The predictor SpouseRace is a categorical variable so the test should be done by using drop1(). Check the previous activity and make sure to specify the correct test when using drop1(). `{r} data=(Q10) M10<-glm(Smoking-Weight*SpouseRace, data=Q10,family="binomial") visualize_model (Q10) drop1 (M10, test="chisq") Single term deletions Model: Smoking - Weight * SpouseRace Df Deviance AIC LRT Pr(>Chi) <none> 401.33 421.33 Weight:SpouseRace 4 406.96 418.96 5.632 0.2284
Expert Answer:
Answer rating: 100% (QA)
import numpy as np import pandas as pd from sklearnmodelselection import train... View the full answer
Related Book For
Statistics and Data Analysis for Financial Engineering
ISBN: 978-1461427490
1st edition
Authors: David Ruppert
Posted Date:
Students also viewed these business communication questions
-
A linear regression model with three predictor variables was fit to a data set with 40 observations. The correlation between Y and was 0.65. The total sum of squares was 100. (a) What is the value...
-
The AMT is designed to make sure that all taxpayers pay their "fair share" of taxes. By now, you have learned enough about taxes to understand that the AMT, like the rest of the tax laws, is very...
-
The model using 12 squared and interaction variables has the smallest s. However, if we desire a somewhat simpler model, note that s does not increase substantially until we move from a model having...
-
(1.71, 2.05) Use the confidence interval to find the margin of error and the sample mean.
-
Ursula is employed by USA Corporation. USA Corporation provides medical and health, disability, and group term life insurance coverage for its employees. Premiums attributable to Ursula were as...
-
According to The Economist, 77.9% of Google stockholders have voting power.7 If 2,000 stockholders are gathered in a meeting, what is the probability that at least 1,500 of them can vote? Use a...
-
Petitioner Christy Brzonkala met respondents Antonio Morrison and James Crawford at a campus party at Virginia Polytechnic Institute (Virginia Tech), where they were all students. At the party, the...
-
Cavalier Company has several processing departments. Costs charged to theAssembly Department for November 2010 totaled $2,229,000 as follows.. Production records show that 35,000 units were in...
-
How can the relationship between Online Analytical Processing (OLAP) systems and Customer Relationship Management (CRM) bolster an organization's marketing efforts?
-
Suppose that a cattle feeder placed 200 head of feeder cattle in April 2020 and planned to sell the fed cattle in August. Expected fed cattle weight is 1200 lbs. per animal. On 25 Apr 2020, the cash...
-
Write a program that checks whether a triangle is perfect. A triangle is perfect if its shortest side length is 3x, its middle side length is 4x and its longest side length is 5x, where x is the same...
-
what are some examples of when law enforcement can search a person, place or thing?
-
How do globalization and transnationalism impact the preservation and adaptation of ethnic cultures and traditions in an increasingly interconnected world?
-
The annexation of Crimea by Russia, how this conflict impacted on international order? Please explain in full details.
-
Would a law that allows juveniles to be treated as adults be constitutional if it disproportionately affect one particular group of people?
-
what extent do political factors influence the construction and maintenance of ethnic identities, particularly in regions marked by conflict or colonial legacies?
-
Select one of the five inventions ( flying shuttle, spinning Jenny, power loom, cotton gin and sewing machine) of the Industrial Revolution. explain the invention and it's significance to the fashion...
-
Determine whether the lines are parallel, perpendicular, or neither. 2x + 3y = -12, 2y - 3x = 8
-
In example 10.4, a bivariate AR(1) model was fit to (ÎCPI, ÎIP) and The mean of (ÎCPI, ÎIP) is (0.00518, 0.00215) and the last observation of (ÎCPI, ÎIP) is...
-
The maturities (T) in years and prices in dollars of zero-coupon bonds are in le ZeroPrices.txt on the book's website. The prices are expressed as percentages of par. A popular model is the...
-
Regardless of your answers to Problem 1, find an ARIMA model that provides a good fit to log(consumption). What order model did you select? (Give the orders of the nonseasonal and seasonal...
-
Discuss the importance of validity and research design. Next, choose one type of validity (internal, external, construct, or statistical conclusion) and discuss its relevance to experimental, quasi...
-
Explain from a technical viewpoint why it is important to distinguish a method, research, approach, and design. Next, briefly discuss how understanding each term individually in addition to how these...
-
Define the two major types of sampling strategies .
Study smarter with the SolutionInn App