

# 1 5 # Predict female unemployment in the unemployment data set # 1 5 # unemployment is in your workspace # $ male_unemployment: num 5 newrates # male_unemployment with 2 more variables: deviance, df.residual # Call wrapFTest() on unemployment_model to see the most relevant details # r.squared adj.r.squared sigma statistic p.value df logLik AIC BIC Glance(unemployment_model) # A tibble: 1 x 11 # F-statistic: 50.56 on 1 and 11 DF, p-value: 1.966e-05 # Call glance() on unemployment_model to see the details in a tidier form

# Residual standard error: 0.5803 on 11 degrees of freedom

# 1.4341 0.6945 # Call summary() on unemployment_model to get more details # broom and sigr are already loaded in your workspace We will use summary(), broom::glance(), and sigr::wrapFTest(). There are a variety of different ways to examine a model each way provides different information. # lm(formula = fmla, data = unemployment) Unemployment_model <- lm(fmla, data=unemployment) :7.900 # Define a formula to express female_unemployment as a function of male_unemploymentįmla <-female_unemployment~male_unemploymentįmla # female_unemployment ~ male_unemployment # Use the formula to fit a model: unemployment_model Summary(unemployment) # male_unemployment female_unemployment # unemployment is loaded in the workspace The outcome is female_unemployment, and the input is male_unemployment. Create a formula to define a one-variable modeling task, and then fit a linear model to the data.The task is to predict the rate of female unemployment from the observed rate of male unemployment.
