BackgroundHospitals are incentivized to reduce rehospitalization rates, creating an emphasis on skilled nursing facilities (SNFs) for post-hospital discharge. How rehospitalization rates vary depending on patient and SNF characteristics is not well understood, in part because these characteristics are high-dimensional. We sought to estimate rehospitalization and mortality risks by patient and skilled nursing facility (SNF) leveraging high-dimensional characteristics.MethodsUsing 1,060,337 discharges from 13,708 SNFs of Medicare patients residing or visiting a provider in Wisconsin, Iowa, and Illinois, factor analysis was performed to reduce the number of patient and SNF characteristics. K-means clustering was applied to SNF factors to categorize SNFs into groups. Rehospitalization and mortality risks within 60 days of discharge was estimated by SNF group for various values of patient factors.ResultsPatient and SNF characteristics (616 in total) were reduced to 12 patient factors and 4 SNF groups. Patient factors reflected broad conditions. SNF groups differed in beds and staff capacity, off-site services, and physical and occupational therapy capacity; and in mortality and rehospitalization rates for some patients. Patients with cardiac, orthopedic, and neuropsychiatric conditions are associated with better outcomes when assigned to SNFs with greater on-site capacity (i.e. beds, staff, physical and occupational therapy), whereas patients with conditions related to cancer or chronic renal failure are associated with better outcomes when assigned to SNFs with less on-site capacity.ConclusionsRisks of rehospitalization and mortality appear to vary significantly by patient and SNF, with certain SNFs being better suited for some patient conditions over others.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12877-023-03995-y.