Hi ,

Thanks to the post replied on the various issues at Statalist, I am able to understand things better.

I have a few queries and looking forward here for the solution. I have a panel data - 470 firms from 2007 to 2016 for 13 financial variables. My variables are missing at some point and I want to interpolate those. I can interpolate the variables like LTD (Long term Debt)and NI (Net Income) by command -

by name, sort:ipolate LTD year, gen(LTD_1)

However, I still get many missing values, so I use extrapolate option with ipolate -

by name, sort:ipolate LTD year, gen(LTD_11)epolate

Now, I need to interpolate the return variables, such as ROA (Return on Assets), ROE (Return on Equity), ROCE (Return on Capital Employed), R &D to NS (Research and Development Expense to Net Sales) and I think that geometric interpolation would be useful in this situation. Grateful for the posts here, I know that this needs to be interpolated on the logarithms and then exponentiate.

Kindly advice how to go about it. I appreciate all the help.
Thanks.


Example generated by -dataex-. To install: ssc install dataex
Code:
clear
input float firmid int year double(LTD ROA TA ROCE TobQ MCap ROE) byte UNGC double Sales long Employees double(RDexp RDtoNS NI)
116 2007 1310.194 3.5793 4511.406 9.4704 .8332 760.721 9.8752 0 5294.516 1625 9.938 .1877 143.173
269 2007 0 14.2312 4895.3 27.3399 1.6697 7507.46 16.8691 . 3148.3 922 14.8 .4701 630.1
259 2007 47.5 6.6728 540.058 21.9592 1.1314 256.5836 19.6371 . 700.258 . . . 28.609
91 2007 3768.785 12.5025 16550.012 21.0105 2.7374 37060.9883 28.7292 . 5875.93 745 . . 679.573
469 2007 750.116 11.3578 3241.8069 . .4433 433.324 15.774 . 457.071 . . . 402.999
240 2007 131302.716 2.3101 286308.094 . 1.4322 156359.0464 19.5001 0 43513.052 10800 . . 7298.029000000001
308 2007 . . . . . . . . . . . . .
236 2007 7181.9751 . 75183.3616 . 1.3982 8894.6521 . . 52389.812 8614 . . -4195.761
98 2007 21626.798 13.7515 77180.658 37.137 2.0665 122282.0451 31.8452 0 64346.284 9000 . . 1467.298
127 2007 . . . . . . . . . . . . .
20 2007 2447.8 16.2146 71499.8 24.8309 3.3948 223865.3058 24.1216 0 57920.8 2702 6.6 .0114 13897.1
139 2007 895.831 6.8464 4600.6699 22.6451 . . 22.6609 . 15634.5605 . . . 123.884
167 2007 14203.7 .9483 39221.5 2.6755 1.3613 22934.3392 3.1026 0 23007.4 . . . 793.734
201 2007 134575.3 3.1602 183839.73 . 1.3523 94240.1778 17.6367 0 15686.37 175 . . 3323.77
361 2007 . . . . . . . . . . . . .
65 2007 2722.534 14.1498 13763.555 31.5191 2.7943 31618.6307 28.0706 0 27762.501 2358 34.72 .1251 1105.036
88 2007 73.424 25.8258 11215.87 73.2546 7.8812 81973.9618 57.6924 0 22337.178 2306 65.1 .2914 2138.577
6 2007 186.625 17.0897 807.961 37.7254 . . 53.6068 . 1330.014 . . . 33.224
129 2007 10164.9004 1.1526 34901.8984 3.4079 1.3993 26084.1214 3.1528 . 23564.6992 . . . 1445.871
144 2007 44749.7 14.1947 159873.8 32.9812 1.7848 191864.1672 34.9255 0 140951.5 15022 36.6 .026 11566.2
321 2007 364.3854 3.2362 1723.3049 10.816 .9828 427.28 11.0323 . 1734.5918 . . . 13.4104
241 2007 . . . . . . . 0 . . . . .
153 2007 . . . . . . . 0 . . . . .
420 2007 23002.5 .1301 121108.4 .0498 1.513 114655.5 .2891 0 86112.1 2926 . . 698.065
171 2007 91293.6016 5.7104 327836.4063 12.8539 .9646 84085.9707 18.3425 1 884994.1875 10897 4.689 .0005 4520.7002
105 2007 249.904 17.8603 3323.852 30.6244 3.9048 11948.71 23.4703 . 5182.564 . 7.092 .1368 492.729
118 2007 215913.7656 . 262439.4063 . . . . . 19012.9297 . . . 2380.4851
60 2007 1280.392 13.9959 15743.512 19.4449 3.4095 48620 20.4693 0 8227.531 2543 . . 1739.523
412 2007 33877.1 9.906 125412.9 27.1762 3.018 288196.4272 27.6682 0 79857.3 10000 . . 7595
261 2007 . . . . . . . 0 . . . . .
184 2007 24380.7188 . 32386.2852 . . . . 0 2999.8716 . . . 225.4411
59 2007 . . . . . . . 0 . . . . .
213 2007 4 2.9146 16930.6992 . 2.4316 30115.5 18.6829 0 4423.2002 . . . 668.09
208 2007 . . . . . . . . . . . . .
463 2007 0 -1.9472 115.0519 . 1.4515 143.998 -2.4399 . 3.2945 10 . . .7324
204 2007 3596.6831 2.5385 10410.2373 8.7506 .8359 2142.5801 6.4435 0 4870.2681 . 31.168 .64 350.315
16 2007 . . . . . . . . . . . . .
417 2007 . . . . . . . . . . . . .
335 2007 3910.3433 11.1309 12220.9863 15.6005 .7553 3653.54 22.3336 0 9329.4248 . 0 0 703.1412
475 2007 6.7176 . 2834.8354 . 3.6421 9302.8415 . . 2405.1244 . . . 74.7056
54 2007 37554.278 17.2166 276653.171 39.2096 5.8198 1448304.1025 43.0977 0 184202.022 20314 . . 20279.486
377 2007 110.094 6.6414 892.616 11.5038 1.3543 659.4466 17.0609 . 833.206 . 19.164 2.3 65.612
345 2007 16477.8336 7.1617 108973.1154 31.283 .7865 9675.648 23.3225 . 95414.8494 . 2 .0021 3889.3006
45 2007 . . . . . . . . . . . . .
407 2007 866.9 . 14535.3 . 7.3564 104325.7363 . 0 6779.6 . . . 2469.4
89 2007 . . . . . . . . . . . . .
383 2007 . . . . . . . 0 . . . . .
193 2007 19364.5 1.5604 561993.7 . .9516 7752.69 25.9659 0 50494.4 20809 . . 5003.9
351 2007 . . . . . . . 0 . . . . .
284 2007 104717.9 3.3437 329418.1 5.6619 . . 6.5458 0 22459.4 . 0 0 8646.6
353 2007 10139.8721 4.5888 33822.4219 9.0494 1.2063 21326.7769 10.3358 0 20406.7656 . . . 1360.911
401 2007 19115.9551 .9342 379931.3125 . .9975 15041.75 22.2636 . 29521.9883 11607 . . 2586.788
323 2007 9102.3828 . 36283.1758 . 1.9073 47836.3152 . 0 15102.9531 875 . . 3098.6079
57 2007 527.1749 . 1624.5922 . .936 161.0641 . 0 4741.9116 . . . 72.5198
119 2007 . . . . . . . . . . . . .
107 2007 0 8.7274 17254.6367 18.0592 1.8557 25340.4407 14.2843 0 5828.1182 2591 . . 1428.234
207 2007 395.331 19.0782 4462.775 40.0214 4.3305 18295.1517 24.15 0 2664.351 1716 . . 72.902
134 2007 218 14.3236 6436.533 44.7359 2.2038 11994.4774 22.5052 0 7614.838 1386 . . 645.048
291 2007 0 43.2133 62474.5 48.0232 4.2634 261676.8 47.2381 0 41858.4 . . . 17789.9
41 2007 657.1958 -.9837 821.2193 -.5721 1.0265 118.8575 -7.6451 . 1306.1027 . . . 4.3879
294 2007 4345.52 16.0951 10533.1465 21.2063 1.1788 6316.3613 35.8011 0 5507.168 1047 5.477 .1311 592.946
336 2007 . . . . . . . 0 . . . . .
329 2007 1959 10.4614 23018.4 25.9945 2.7667 51145.5136 20.8934 0 24201.8 7542 1074 4.4377 1206.5
302 2007 44.5314 5.4828 1106.8554 12.5895 .8204 488.46 8.988199999999999 0 1311.9549 326 2.4 .1829 -41.164
437 2007 97414.791 .4625 748638.955 . .9874 17186.24 12.3365 0 57154.166 24904 . . 1966.521
355 2007 . . . . . . . . . . . . -35.76
170 2007 . . . . . . . 0 . . . . .
94 2007 33706.0156 1.5435 38862.9805 . .9952 3062.486 16.8704 0 3572.0339 416 . . 435.975
157 2007 43206.8 1.3959 913082.5 . 1.2629 304745.5945 19.5116 0 82244.9 21477 . . 8815.6
449 2007 2769.5779 -4.7181 6187.7485 9.3545 1.0549 2245.7683 -13.2627 . 2788.656 . . . 227.5347
160 2007 . . . . . . . . . . . . .
309 2007 3143.38 9.029 15135.4 11.4252 . . 17.488 . 2351.76 . . . 349.23
151 2007 . . . . . . . 0 . . . . .
232 2007 2312.25 1.5357 6075.2202 6.8533 1.1486 2328.9203 5.8064 0 4330.8999 . . . 299.03
221 2007 371.477 1.7396 3381.9561 14.3967 .9327 1271.6165 3.849 . 2359.6741 . . . 116.142
421 2007 4462.6 38.6523 131861.5 67.1773 9.4859 1207458.563 56.7399 1 186852.1 89419 280.2 .15 29667.4
228 2007 2846.9 . 18408.9 . 1.8361 22321.2066 . . 20439.1 . . . 1203.8
137 2007 . . . . . . . . . . . . .
101 2007 . . . . . . . . . . . . .
472 2007 26854.6191 8.7019 51530.8906 22.3731 1.6408 45755.1521 32.9777 0 24908.1504 . 1515.6801 6.0851 -1388.58
131 2007 0 19.2693 9131.0596 27.4711 3.7011 31127.4066 27.3618 0 12784.668 2632 109.45 .9843 1883.323
195 2007 148475 7.9301 1041519.2 18.7925 1.0973 466796.0757 23.4287 1 1844607 29862 809.8 .0439 51159
304 2007 2701.73 8.6055 9913.8086 15.3549 1.2786 6441.6006 26.1011 0 8090.4888 . . . 378.509
224 2007 12917.032 5.1779 39066.02 12.5733 1.1768 15537.0339 20.3791 0 38731.418 . . . 1671.896
9 2007 40664.4 2.8132 79101.5 12.2554 1.5091 51774.5891 17.2816 0 152370.1 610 . . 1345.8
196 2007 31293.036 1.4242 822568.284 . 1.0195 55978.2 28.1379 0 62191.217 23861 . . 7833.442
459 2007 834.2995 4.0568 2431.7422 7.7771 .8543 388.0771 10.8027 0 1694.8212 . 0 0 41.6543
133 2007 4601.239 18.8194 19438.551 43.3234 4.4222 73385.5185 58.3815 0 12515.336 . . . 879.76
378 2007 9784.2002 8.9723 16601.3008 14.0386 1.4049 11658.8872 34.3796 0 8179.7002 . . . 765.621
136 2007 4279.187 3.0148 22817.789 20.7382 2.8566 47090.2641 13.1326 . 23789.71 1528 13.938 .0586 489.977
115 2007 3321.5271 -1.7619 12985.6514 . .9056 4855.5092 -3.628 0 8397.0264 . . . 801.908
381 2007 0 .0126 894.96 .707 1.4323 625.2504 .0441 . 1303.285 320 3.1528 .2419 -76.271
124 2007 6848.4434 2.7925 9682.8936 . .9312 913.9033 14.4611 . 1294.1835 . . . 811.5045
73 2007 6451.442 . 16566.836 . .7773 1195.0714 . 0 23664.892 5384 41.413 .175 -161.117
62 2007 0 -.5377 1194.4969 . .885 547.5 -.9168 . 521.363 160 . . 22.126
418 2007 207.658 7.4661 895.116 13.7503 .9102 334.1625 17.2086 0 1231.3409 . 1.334 .1205 10.266
282 2007 258.894 . 382.0352 . 1.3629 232.05 . . 80.2481 . . . 20.4598
344 2007 104709.9 1.9377 217046.9 . . . 40.5827 0 19146.6 9325 . . 2856.8
320 2007 1268.2966 12.6017 4332.3188 23.7037 1.1686 2412.6739 33.2564 . 3147.353 . . . 221.2927
138 2007 1004.573 9.5852 8231.8916 19.2705 1.4692 7946.0123 18.702 . 10050.75 52000 . . 609.676
end