Fit the model with an explicit formula
A basic model can be fitted with lm(outcome ~ predictor, data = dat). Multiple predictors are added with +, and interactions can be represented with terms such as exposure * sex when that matches the research question.
Before fitting, confirm that numeric variables are actually numeric and categorical variables have the intended factor levels and reference category.
Read coefficients before model summaries
summary(model) reports estimates, standard errors, t-statistics and p-values. Start with the estimate column. Translate each coefficient into the units of the outcome and predictor, then use uncertainty measures to judge precision.
confint(model) gives confidence intervals for coefficients. For categorical predictors, interpret each level relative to the reference level unless you have changed the contrast coding.
Check diagnostics
plot(model) produces several standard diagnostic plots, including residual-versus-fitted and Q-Q plots. These can reveal non-linearity, changing variance, unusual residuals and influential observations.
Do not treat each plot as a pass/fail test. Ask whether any pattern is large enough to affect the inferential or predictive goal of the model.
Make the workflow reproducible
Keep data cleaning, model fitting, diagnostics and output generation in code. Avoid manually editing model-ready data because that makes it harder to reproduce or explain the analysis.
A short script that another person can rerun from raw input to final table is often a stronger analytical product than a long sequence of undocumented console commands.
