The invention is directed to a compound represented by the Formula (1) as defined herein, and a method for preparing a compound represented by the Formula (1) which includes: reacting a diamine compound represented by the Formula (2) as defined herein with a methacrylic anhydride or an acrylic anhydride under a condition where an organic acid having a pKa of 2.0 or more is present in an amount of 0.5 to 5.0 moles based on 1 mole of the diamine compound to obtain a reaction mixture; adding phosphoric acid to the reaction mixture; and purifying the reaction mixture by extraction with an organic solvent.