* Estimate the model poisson trade lypex lypim lyex lyim ldist border comlang colony landl_ex landl_im lremot_ex lremot_im comfrt_wto open_wto, robust * Get fitted values of trade predict fitted * Compute correlation between trade and fitted values qui cor fitted trade * Display R2 computed as the square of the correlation between trade and fitted values di as txt " R-squared " (`r(rho)')^2