BASIC nature of any compound depends upon how it releases electron or accept proton or if it is inorganic hydroxide than releasing nature of hydroxide ion.but major factor in organic compound is tendency to give electron so +Ieffect and +Reffect always increases basic nature for example CH3NH2 is more basic than ClNH2,(CH3)2NH is more basic than CH3NH2.AS the vacant d-orbital in any system increses basic nature decreases for example 3rd period element is less basic than 2nd period because in 3rd period element there is vacant d-orbital which decreases basic nature.so NH3 IS more basic than PH3 while H2O is more than H2S.if same period comperision than electronegativity factor apply,less electronegative is more basic so NH3 IS more basic than H2O.