In this research, we develop and apply causal inference methods for the field of infectious diseases. In the first part of this research, we consider an inverse probability (IP) weighted Cox model to estimate the effect of a baseline exposure on a time-to-event outcome. IP weighting can be used to adjust for multiple measured confounders of a baseline exposure in order to estimate marginal effects, which compare the distribution of outcomes when the entire population is exposed versus the entire population is unexposed. IP weights can also be employed to adjust for selection bias due to loss to follow-up. This approach is illustrated using an example that estimates the effect of injection drug use on time until AIDS or death among HIV-infected women. In the second part of this research, we develop and apply methods for generalizing trial results for continuous data. In a randomized trial, assuming participants are a random sample from the target population may be dubious. Lack of generalizability can arise when the distribution of treatment effect modifiers in trial participants is different from the distribution in the target. We consider an inverse probability of sampling weighted (IPSW) estimator for generalizing trial results to a user-specified target population. The IPSW estimator is shown to be consistent and asymptotically normal. Expressions for the asymptotic variance and a consistent sandwich-type estimator of the variance are derived. Simulation results comparing the IPSW estimator to a previously proposed stratified estimator are provided. The IPSW estimator is employed to generalize results from the AIDS Clinical Trials Group (ACTG) to all people currently living with HIV in the U.S. In the third part of this research, we develop and apply methods for generalizing trial results for right-censored data. The IPSW estimator is considered for right-censored data and is defined as an inverse weighted Kaplan-Meier (KM) estimator. Simulation results are provided to compare this estimator to an unweighted KM estimator and a stratified estimator. The average standard error is computed using a nonparametric bootstrap. The IPSW estimator is employed to generalize survival results from the ACTG to all people currently living with HIV in the U.S.