Identify the role marshmallow plays in your recipe: fluffy filling, stretchy candy, or a sweet melt/coating.
Choose the substitute that matches that role, then use the listed ratio starting point.
If your substitute is wetter (spreads, coconut), simmer/whisk briefly and chill 15–20 minutes before final setting.
If your substitute is less “puffy” (syrups), add gelatin/agar/binder and let it set before cutting or serving.
Test in a small batch or on one portion first; adjust sweetness with a pinch of salt or a little sugar based on your final texture.