HW 7 Rubric
Rubric
This is the rubric for AI feedback, not necessarily the rubric for grading. It follows the question numbering and content of the current hw-7.qmd.
Feedback guidance
- Review the student’s submitted work against the assignment and these criteria. Identify what is correct, what needs attention, and why; offer focused prompts for revision rather than completed answers or replacement code.
- Do not supply undiscovered thresholds, numerical estimates, interval bounds, p-values, test decisions, or substantive conclusions. Check these against the student’s code, output, and data when available.
- Accept equivalent valid approaches unless the assignment explicitly requires a particular method or a single pipeline. Use the course’s tidyverse and tidymodels conventions when giving code feedback.
- Simulation results may vary with the seed. Check the method and consistency of the results rather than requiring a particular numerical answer.
- Identify an upstream error once, then distinguish its downstream consequences from new errors. Evaluate interpretations against the student’s displayed results while noting any effect on the requested analysis.
- If source code, rendered output, reference images, data, or GitHub history are unavailable, state which checks cannot be verified. Do not infer completion from a claim alone.
Questions
Question 1
Code reads the supplied birth data and saves the unmodified data frame as
births14_raw.A single pipeline identifies rows missing at least one of the five specified variables, without requiring all five values to be missing.
Output displays only the five requested variables and includes all qualifying rows.
Code handles missing values explicitly and does not filter on unrelated variables.
Question 2
A single pipeline starts from
births14_rawand removes rows with missing values among the variables identified in Question 1.Missing values in unrelated columns do not cause additional rows to be discarded.
Code saves the result as
births14and retains the original columns.Code obtains the dimensions of the updated data frame, and the narrative states both the number of rows and the number of columns consistently with that output and the assignment’s row-count check.
Question 3
The analysis uses the birth data to investigate the relationship between mother’s age and the recorded maturity categories, rather than relying on medical knowledge or external sources.
Displayed summary statistics and/or a visualization provide enough evidence to locate the boundary between categories.
The narrative describes the investigation and states a threshold with clear boundary conventions consistent with the displayed evidence.
The conclusion distinguishes an age-category rule from a statement about average ages within categories.
Question 4
The analysis uses the birth data to investigate the relationship between recorded weight and the low-birthweight categories, rather than relying on medical knowledge or external sources.
Displayed summary statistics and/or a visualization examine the category boundary closely enough to support the proposed threshold.
The narrative describes the investigation and states a threshold in the correct units, supported by the displayed evidence.
The response checks whether the proposed classification rule accounts for observations at the boundary and acknowledges any ambiguity or exceptions in the recorded data rather than asserting an unsupported exact separation.
Question 5
A single pipeline recodes all three requested categorical variables with the exact labels specified in the assignment.
Recoding preserves each observation’s category membership and does not introduce unintended missing values.
The same pipeline moves the three recoded variables to the front, in the requested order, and saves the result back to
births14.Output displays the first 10 rows of the updated data frame. Displaying only the columns that fit across the page is acceptable.
Question 6
Part (a). A single pipeline produces a summary table from the prepared
births14data, with the same group combinations, rows, columns, and ordering as the reference table.Part (a). Counts are calculated correctly for each displayed category within each combination of mother’s age category and smoking status.
Part (a). Each displayed percentage uses the appropriate group total as its denominator, with rounding and percentage formatting matching the reference.
Part (a). The rendered table has the requested column names, caption, and table number. Check the rendered document when numbering cannot be verified from source alone.
Part (b). The bar plot reproduces the reference’s variable mappings, bar arrangement, faceting, and axis scales.
Part (b). The plot reproduces the reference’s title, axis labels, category labels, legend labels and position, and other visible details. Figure width and aspect ratio are reasonably close; exact dimensions are not required.
Part (c). In 1–2 sentences, the narrative identifies a specific misleading feature and explains its consequence for comparison, using evidence from the table and plot.
Part (d). The revised visualization addresses the identified issue and supports the intended comparison of low-birthweight prevalence across groups.
Part (d). Any calculated quantities use denominators appropriate to the stated conditional comparison; axis labels and scales accurately describe what is displayed.
Part (d). The explanation states what changed, why the choice improves the comparison, and what the revised plot shows. Claims agree with the plotted data and avoid causal interpretations.
Question 7
Part (a). Code fits the requested linear regression using baby weight as the response and mother’s age category as a categorical predictor, with the prepared
births14data.Part (a). Code uses the course’s tidymodels workflow and displays tidy coefficient output.
Part (b). Code sets a seed and generates 1,000 bootstrap resamples of observations, preserving response–predictor pairs and fitting the same model to each resample.
Part (b). Code constructs and displays a 95% percentile bootstrap confidence interval for the requested non-intercept coefficient.
Part (b). The interpretation states the confidence level, interval bounds, weight units, average or expected comparison, and comparison direction consistently with the fitted reference category.
Part (b). The interval is interpreted as uncertainty about a population mean difference, rather than an interval containing individual baby weights or a probability assigned to the fixed parameter.
Part (c). The plot displays the bootstrap slope distribution actually used for the interval, with readable labels identifying the coefficient and units.
Part (c). The description of shape and center agrees with the displayed distribution and relates its center to the observed coefficient.
Part (d). The conclusion about a discernible difference follows from the displayed confidence interval, explains the relevance of the null value, and addresses the specified groups in context. No separate hypothesis test is required.
Question 8
Part (a). Code fits the requested additive linear regression using baby weight as the response, mother’s numeric age and categorical smoking status as predictors, and the prepared
births14data.Part (a). Code uses the course’s tidymodels workflow and displays tidy coefficient output.
Part (b). Code sets a seed, generates 1,000 bootstrap resamples of complete observations, and fits the same two-predictor model to each resample.
Part (b). Code constructs and displays separate 95% percentile bootstrap confidence intervals for both requested non-intercept coefficients, with each interval clearly identified.
Part (b). The numeric-age interval interpretation states the confidence level, bounds, response units, and average or expected difference for a one-year age increment, holding smoking status constant.
Part (b). The smoking-status interval interpretation states the confidence level, bounds, response units, and average or expected comparison between the fitted categories, holding mother’s age constant.
Part (b). Both interpretations agree with the coefficient signs, reference category, and displayed intervals, and avoid causal claims or claims about individual outcomes.
Part (c). Plots display the bootstrap distributions used for both slope intervals, with labels that distinguish the coefficients and their units.
Part (c). Descriptions of shapes and centers agree with the displayed distributions and relate the centers to the corresponding observed coefficients.
Overall
These criteria apply throughout the homework. Check them when asked for overall feedback, when noticed during a question review, or as the student finishes the assignment.
Code is readable, with appropriate indentation, line breaks after pipes and plot layers, spaces around assignment and named arguments, and spaces after commas. Consistent indentation with two spaces, four spaces, or tabs is acceptable.
Code uses appropriate course tools without unnecessary package reloading, redundant steps, or hard-coded analytical results. Equivalent valid implementations are acceptable.
Code, displayed output, and narrative agree. Labels distinguish populations, groups, parameters, statistics, and units clearly.
The document renders successfully and is organized so questions, lettered parts, plots, and interpretations are easy to locate.
The final
.qmdand rendered PDF exist in the remote GitHub repository, and at least three commits have been made and pushed. Verify repository evidence when available; otherwise mark these checks as unverified.The AI-use disclosure states whether an LLM or generative AI tool was used and, if so, describes its uses and lists tools and model names and versions if known.
Non-AI sources used are cited with the questions for which they were used.