BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
karen8169
Obsidian | Level 7
Data paper;
input date search_volume AvgPrice_change volume_change mood_price mood_TWeconomic mood_government mood_possibility mood_global mood_investment;
datalines;
20131229 31265.96873 -8049968 101.6245784 85.46101172 100.6374401 115.9752537 118.0235693 93.97899654
20140105 27950.70473 -32.37 16673309 101.4670963 85.20483674 99.47578826 116.2290342 117.99756 93.82381802
20140112 25902.91541 34.49 -1744281 101.3045585 84.9599483 98.31558748 116.4796395 117.9683595 93.67532876
20140119 23850.62263 8.1 -2784694 101.1367771 84.74080987 97.1608941 116.7261614 117.9323331 93.54195118
20140126 16471.45342 -76.11 -17009604 100.9635581 84.57583371 96.02679831 116.9660368 117.8800425 93.44019161
20140202 18413.8849 -229.31 9574282 100.7847013 84.52277179 94.96965667 117.1940095 117.7882222 93.40347039
20140209 22096.8015 126.25 7354967 100.6 84.7 94.2 117.4 117.6 93.5
20140216 21174.52948 121.41 -35509 101.0706661 85.3506424 94.50432279 117.5650212 117.1765452 93.86927514
20140223 19110.34379 65.78 -2446057 101.5358183 86.23143162 95.09613037 117.707928 116.6566982 94.37169343
20140302 20039.02689 23.54 5415362 101.9959941 87.22377081 95.76489134 117.8386143 116.0973493 94.93887711
20140309 20082.52542 79.28 -2237921 102.4517257 88.26948972 96.45424708 117.9620219 115.5218055 95.53709453
20140316 18755.35847 -9.17 759321 102.9035397 89.33933393 97.14909964 118.080143 114.9396057 96.14921551
20140323 18181.1214 -156.99 -386470 103.3519585 90.41711766 97.84536379 118.1928278 114.3546296 96.76554749
20140330 16583.05049 262.66 -3366550 103.7975004 91.490956 98.54178229 118.2977235 113.768397 97.37865063
20140406 17277.2075 41.98 5017880 104.2406805 92.54682679 99.23740718 118.3893211 113.1813592 97.9793578
20140413 16706.70072 52.32 -1804624 104.6820111 93.56097486 99.92970051 118.4567229 112.593283 98.55187068
20140420 16448.80356 64.29 3505396 105.1220022 94.48704387 100.6094497 118.4792265 112.0030525 99.06530847
20140427 15159.39418 -281.38 -6300657 105.5611627 95.23096501 101.2423105 118.4179359 111.4077198 99.45718826
20140504 16407.68482 215.73 5698531 106 95.6 101.7 118.2 110.8 99.6
20140511 15863.96562 -2.15 -3449302 105.2148274 95.19833474 101.5032869 117.689092 110.1620765 99.23299517
20140518 14733.00752 7.82 -15661 104.4289314 94.42165813 101.131402 117.0215782 109.5117766 98.61684747
20140525 14988.46355 138.95 3910103 103.6414034 93.46251545 100.7126266 116.2703653 108.8564055 97.87895215
20140601 13836.44918 66.12 -3898532 102.8513332 92.4146101 100.2812996 115.4744435 108.1989573 97.08157585
20140608 14721.77203 47.32 4140873 102.0578073 91.32356274 99.84661271 114.6546858 107.5406598 96.25516597
20140615 14364.49877 42.3 -149009 101.2599086 90.21162401 99.41102646 113.8223066 106.882019 95.41463845
20140622 14247.61966 96.83 -770514 100.4567147 89.08972771 98.97519954 112.9834058 106.223249 94.56735706
20140629 13867.25553 39.38 6887811 99.6472971 87.9634136 98.53930851 112.1414406 105.5644542 93.71707258
20140706 13952.17408 164.83 -325146 98.83072013 86.83582833 98.10340143 111.2986265 104.9057175 92.86592928
20140713 13606.93546 0.54 -918370 98.00603987 85.70942995 97.66749426 110.4568349 104.2471717 92.01561203
20140720 12365.85288 -44.03 -7988279 97.172303 84.58731944 97.23160275 109.6183516 103.5891114 91.16824759
20140727 13382.69317 -37.88 9406327 96.32854576 83.47492055 96.795774 108.786803 102.9322445 90.32754231
20140803 13215.86645 -135.61 -3038838 95.47379277 82.3829178 96.3601809 107.9686256 102.2782929 89.50076485
20140810 12929.63734 -170.46 -2523942 94.60705598 81.33304427 95.92546843 107.175674 101.6314575 88.70263453
20140817 12262.72744 112.9 281306 93.72733345 80.36985449 95.49404583 106.4300251 101.0019889 87.96319539
20140824 11969.15285 170.51 1977123 92.83360826 79.58485954 95.07491354 105.7729235 100.4149026 87.3438882
20140831 12274.05186 81.17 -3339063 91.92484727 79.16609864 94.70169502 105.2814952 99.93124606 86.97041804
20140907 11168.15524 -22.27 -6063453 91 79.5 94.5 105.1 99.7 87.1
20140914 10709.79633 -245.73 4015437 92.86247344 81.38070895 94.93907809 105.4982892 100.0847369 88.25895582
20140921 10817.08069 14.13 2381477 94.70994447 84.01080341 95.54967284 106.2058062 100.7218914 89.91898182
20140928 10663.75135 -202.08 555739 96.54454869 86.99880344 96.2061539 107.0772998 101.4624966 91.8198207
20141005 9763.12662 99.82 -7200394 98.36840687 90.14710652 96.87482219 108.0339656 102.2455358 93.83003752
20141012 10960.82462 -350.86 11107201 100.1836273 93.34494631 97.54639523 109.0315122 103.0460689 95.87670885
20141019 9997.050868 -150.34 -5939264 101.9923084 96.50839046 98.21741005 110.0422145 103.8540284 97.90641251
20141026 9944.235397 54.43 3005273 103.7965409 99.53487456 98.88328534 111.043678 104.6656602 99.85664947
20141102 9784.14586 337.87 -695123 105.5984105 102.2476429 99.52914291 112.0097644 105.4803329 101.6224102
20141109 9546.99488 -71.79 314380 107.4 104.3 100.1 112.9 106.3 103
20141116 9244.900155 65.78 17325 107.1137614 104.9875055 100.3906136 113.6431749 107.1308611 103.5780729
20141123 8808.63662 141.05 -2007912 106.8289945 105.0108012 100.6062109 114.3073978 107.966287 103.7653034
20141130 9175.051622 -106.01 6162136 106.5453701 104.7107263 100.8017273 114.928784 108.8035298 103.7612856
20141207 9101.637737 192.83 -3773128 106.2625603 104.2529501 100.9918666 115.526091 109.6413859 103.6633056
20141214 9172.5426 -243.29 558458 105.9802382 103.7177153 101.1805602 116.1083186 110.4791731 103.5183848
20141221 9123.711552 44.47 659235 105.6980775 103.143305 101.368843 116.6783565 111.3161508 103.3484336
20141228 7537.97184 184.01 -15376329 105.4157519 102.5467811 101.5569268 117.2341545 112.1508902 103.1619725
20150104 8631.193364 75.88 15715797 105.1329351 101.9332268 101.7446246 117.7678923 112.9800594 102.9586901
20150111 8838.39816 -94.29 -1215958 104.8493002 101.2984994 101.9309764 118.2628103 113.7955908 102.7292765
20150118 9033.024336 -14.26 1006714 104.5645194 100.6269873 102.1123252 118.6864184 114.5778228 102.4504429
20150125 8806.864325 290.8 -4007234 104.2782633 99.88315215 102.2749908 118.9773302 115.2787831 102.0724634
20150201 8292.73749 -105.73 -1926215 103.9902012 98.99227849 102.3678625 119.0203884 115.781405 101.4925741
20150208 8117.578392 96.29 -3199204 103.7 97.8 102.2 118.6 115.8 100.5
20150222 6591.595891 117.27 -5681716 100.4025975 93.8762347 99.65545289 115.5624827 112.9907375 96.41397393
20150301 7429.726695 82.72 9511806 98.74542109 91.61746494 98.18301893 113.5652513 111.1458061 93.96348573
20150308 8641.626314 -48.07 1688606 97.08004277 89.28790494 96.69190424 111.4371422 109.2197128 91.41524066
20150315 8644.147128 -33.59 2397045 95.40453741 86.92474241 95.19579544 109.2411834 107.2605892 88.82044782
20150322 8632.189365 176.43 -36298 93.71696819 84.54696258 93.6983737 107.0129085 105.2884851 86.20541569
20150329 8322.389316 -226.5 -7388523 92.01538432 82.1656325 92.20068972 104.7747561 103.3124148 83.58562578
20150405 7574.663565 86.59 291948 90.29781882 79.78989601 90.70326885 102.5451621 101.3380208 80.97401444
20150412 7734.082764 2.67 6631101 88.56228623 77.43192706 89.20716356 100.3460307 99.37237042 78.38789311
20150419 8239.993245 -80.81 5176902 86.80678032 75.11352422 87.71606202 98.21160991 97.42996479 75.85820908
20150426 7965.947754 399.35 -6679423 85.02927178 72.87791905 86.24367723 96.20236985 95.54506699 73.44610063
20150503 7611.97648 -87.67 2149209 83.22770586 70.8131946 84.84122033 94.42950642 93.80083155 71.27560286
20150510 7948.371142 -89.57 34649 81.4 69.1 83.7 93.1 92.4 69.6
20150517 8049.740643 -160.19 1810588 81.80332784 68.1094081 83.53470096 92.60048813 91.83726572 68.93731922
20150524 7569.963872 50.53 -365999 82.1788692 67.47043556 83.63063861 92.54465555 91.61795711 68.76965605
20150531 7514.023004 33.85 1606634 82.52705819 67.00257124 83.79650464 92.72597471 91.53937295 68.84391462
20150607 7687.393563 -363.91 -3053101 82.84829731 66.61799333 83.98108926 93.03401668 91.51845182 69.03641459
20150614 7915.602594 -19.56 -8869002 83.1429579 66.27399626 84.17068452 93.40970316 91.52115568 69.2867286
20150621 6886.880676 -56.9 6446118 83.41138059 65.94985708 84.36162107 93.82136675 91.53353178 69.56535677
20150628 7376.858034 111.2 -986561 83.65387566 65.63560988 84.55291678 94.2519187 91.54985038 69.85794586
20150705 7046.740272 -49.1 250462 83.87072342 65.32664725 84.7443091 94.6919242 91.5677336 70.15761095
20150712 6616.456938 -363.14 1492804 84.06217456 65.02122441 84.93572903 95.1357792 91.58613371 70.46125243
20150719 6883.896656 138.28 -1012797 84.22845038 64.71951407 85.12716286 95.57943954 91.60444244 70.76789785
20150726 6811.449276 -351.76 2591536 84.36974309 64.42370003 85.31862474 96.01878221 91.62197384 71.07818172
20150802 6726.622821 -96.71 -2467667 84.48621602 64.13916011 85.51018505 96.44793455 91.63738107 71.39468492
20150809 6190.303924 -225.9 837044 84.57800381 63.8773793 85.70211132 96.8568946 91.6475114 71.72331535
20150816 6614.64462 -102.73 -961392 84.64521257 63.66217123 85.8954043 97.2274781 91.64472583 72.07646834
20150823 6496.243056 -588.27 6072919 84.68791999 63.54257797 86.09380286 97.52594979 91.61040467 72.47965752
20150830 6772.360023 306.99 -6443063 84.70617543 63.61943611 86.3112747 97.68935333 91.49911757 72.98516327
20150906 6770.10926 -35.86 -2063670 84.7 64.1 86.6 97.6 91.2 73.7
20150913 6673.061307 341.81 -1147600 84.88444623 65.41021135 87.15491213 97.03777899 90.44249953 74.84316328
20150920 6459.860415 71.93 -1159338 85.04466766 67.12168 87.78104647 96.22516514 89.49764482 76.19351728
20150927 6303.013815 -307.35 -6652058 85.18084951 69.02337687 88.42612902 95.28316911 88.47718145 77.64076239
20151004 5344.697037 245.84 5738194 85.29314919 71.00731951 89.0758477 94.2803733 87.42857478 79.1264307
20151011 5971.639212 135.35 4857241 85.38169653 73.01007798 89.72517866 93.26072284 86.37536355 80.61260869
20151018 6417.000734 150.45 -1530612 85.44659389 74.97841489 90.36832135 92.26133301 85.33717184 82.06165551
20151025 6091.730304 78.02 -194664 85.48791627 76.84044669 90.98707721 91.3275291 84.34639288 83.41606707
20151101 5904.13722 -135.28 4424636 85.50571145 78.46670435 91.5143898 90.53121314 83.47572883 84.56771435
20151108 6116.07632 131.14 -3583511 85.5 79.6 91.7 90 82.9 85.3
20151115 5822.92998 -424.55 -1145703 84.88631491 79.71610825 90.60906288 89.96892954 83.04477192 85.17199008
20151122 5767.492714 202.47 -2050808 84.24840717 79.33732238 89.17641702 90.20521808 83.48477546 84.6236336
20151129 5731.552584 -140.76 3725045 83.5855394 78.71785155 87.65230242 90.58442113 84.04573872 83.87001608
20151206 5951.292566 92.64 -1193352 82.89694534 77.98152586 86.10370541 91.04000605 84.65622617 83.01641905
20151213 5652.626049 -373.8 -353441 82.18182898 77.18887517 84.54856292 91.53639163 85.2869063 82.11464026
20151220 5785.745716 169.38 -1598964 81.43936368 76.36991804 82.99169828 92.05452992 85.9256148 81.19070272
20151227 5513.3874 146.13 -8992969 80.66869117 75.54042289 81.43448455 92.5841876 86.56701287 80.25877565
20160103 5094.713425 -58.39 12164545 79.86892056 74.71044964 79.87759543 93.11979924 87.20804829 79.32875429
20160110 5527.809588 -459.99 -1523971 79.03912736 73.88979924 78.32235496 93.65821207 87.84536054 78.41155334
20160117 5461.9691 -177.13 156369 78.17835233 73.09332286 76.77339014 94.1974084 88.47242373 77.52494577
20160124 5318.710272 135.06 3784776 77.28560045 72.34896669 75.24790103 94.73568808 89.07399857 76.70307039
20160131 5400.46584 350.51 -14671978 76.35983973 71.71291047 73.81012021 95.27097946 89.61317631 76.01469435
20160214 4178.142814 -187.59 10544886 76.36728862 71.34595914 72.81394648 96.31692609 90.0149858 75.74557513
20160221 5427.485784 339.14 -20231 77.30050686 71.61515673 73.25555361 96.82731243 89.87761243 76.16488483
20160228 5371.5115 65.59 -1313205 78.20073348 71.99288989 73.78486918 97.33406371 89.67782732 76.71782793
20160306 5165.937 275.36 4877965 79.06900912 72.42324943 74.33766102 97.83861161 89.45251732 77.33579013
20160313 5740.33275 89.74 1191735 79.90633748 72.87883391 74.89673065 98.34149495 89.21686873 77.984939
20160320 5487.371846 79.68 -5660239 80.71368649 73.3459062 75.45745685 98.84257804 88.9772783 78.64812531
20160327 5348.992638 -112.44 -271843 81.49198943 73.81695214 76.01853731 99.3409957 88.73679154 79.31570916
20160403 5426.780965 -108.56 -7778413 82.24214598 74.28661007 76.57937944 99.83480265 88.49769195 79.9804031
20160410 4641.285 -86.2 8104328 82.96502332 74.74876648 77.13891314 100.3201853 88.26344232 80.63337371
20160417 5279.359605 162.84 -687519 83.66145706 75.19324427 77.69344695 100.7899162 88.04162877 81.25951622
20160424 5220.884313 -140.66 -2782584 84.33225226 75.60028983 78.22927238 101.2304259 87.85041018 81.8293742
20160501 5028.013578 -178.79 -1434215 84.97818435 75.9298725 78.69519947 101.6163034 87.73395637 82.28338197
20160508 4828.00368 -205.7 3444823 85.6 76.1 78.9 101.9 87.8 82.5
20160515 4990.55814 -121.44 -3002432 85.08991782 75.94230317 78.12929004 101.9925612 88.31142764 82.23069763
20160522 4925.14642 115.17 2950158 84.55584837 75.6251029 77.09745341 101.9830062 89.00535577 81.72395896
20160529 4966.103024 326.24 3314837 83.99717427 75.23031703 75.99571799 101.9189748 89.7740574 81.10125203
20160605 5009.6448 128.53 -11823405 83.41324971 74.79783531 74.8752725 101.8260319 90.57337579 80.42200794
20160612 4435.354066 29.09 6766040 82.8033997 74.34712766 73.74982087 101.7180268 91.38518363 79.71541332
20160619 4728.062988 -21.98 1352997 82.16691925 73.887791 72.62303741 101.6027051 92.20197179 78.99602373
20160626 4876.042706 -205.97 1867808 81.50307263 73.42474789 71.49592818 101.484848 93.02046527 78.27155006
20160703 4765.53658 322.03 -6029749 80.81109244 72.96091316 70.36884655 101.368209 93.83883888 77.5469835
20160710 4288.459904 -0.09 8840149 80.09017877 72.49877277 69.24220124 101.2570352 94.65516551 76.82726554
20160717 4874.674527 224.38 -286372 79.33949827 72.04173053 68.11727507 101.1577886 95.46577777 76.11993141
20160724 4955.11527 77.75 -1708660 78.55818317 71.59595192 66.99879511 101.0817639 96.26215009 75.43914106
20160731 4766.036 -21.62 -1875898 77.74533029 71.17370391 65.90440311 101.049666 97.02365051 74.81325397
20160807 4671.079296 114.33 1505199 76.9 70.8 64.9 101.1 97.7 74.3
20160814 4751.418455 29.29 -218000 77.14196954 70.52615005 64.23177555 101.3046738 98.16852675 74.01736186
20160821 4553.755556 -147.68 -1827657 77.3507642 70.30089661 63.65354016 101.5918086 98.55189175 73.8474285
20160828 4579.152453 112.85 1070084 77.52662534 70.09930697 63.09939338 101.9229408 98.90035395 73.73258004
20160904 4650.93738 -85.15 2827400 77.66975625 69.90926713 62.55169524 102.2774351 99.23449902 73.64466417
20160911 4853.76 -0.87 -12242308 77.78032239 69.72491958 62.00572535 102.6441232 99.56274057 73.56993609
20160918 3653.548384 -28.1 7674658 77.85845156 69.54349032 61.46022579 103.0167778 99.88847326 73.50170579
20160925 4451.08752 225.93 -8661369 77.90423409 69.36378622 60.91488093 103.3915895 100.2129588 73.43675925
20161002 3707.56604 -9.82 5415594 77.91772289 69.18554864 60.36968507 103.7656229 100.5363985 73.37363907
20161009 4481.242982 92.27 -1090716 77.89893356 69.00931336 59.82493105 104.1356272 100.8581046 73.31186484
20161016 4135.71384 -161.12 2768651 77.84784437 68.83670082 59.28179686 104.496719 101.1759157 73.25167621
20161023 4343.89755 183.27 -492913 77.76439628 68.6712939 58.7447058 104.8404034 101.4843585 73.19416102
20161030 4125.372995 -50.74 -1816776 77.64849282 68.52057873 58.23018832 105.1511315 101.7699954 73.14183724
20161106 4042.326155 -180.23 6966518 77.5 68.4 57.8 105.4 102 73.1
;
proc model data=paper;
exog search_volume volume_change mood_price mood_TWeconomic mood_government mood_possibility mood_global mood_investment;
instruments _exog_;
parms b0 b1 b2 b3 b4 b5 b6 b7 b8;
AvgPrice_change = b0 + b1*search_volum + b2*volume_change + b3*mood_price + b4*mood_TWeconomic + b5*mood_government + b6*mood_possibility + b7*mood_global + b8*mood_investment;
fit AvgPrice_change / gmm kernel=(bart,11,0) vardef=n;
run;
quit;

The code can't run. But I'm confused by the bug in the log.txt.

By the way, I want to ask how to run a function in different period.

ex.

AvgPrice_change(t) = b0 + b1*search_volum(t-1) + b2*volume_change(t-2) + b3*mood_price(t)

 

Thanks a million.

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

I think I've found something:

proc model data=paper;
 exog search_volume volume_change mood_price mood_TWeconomic mood_government mood_possibility mood_global mood_investment;
 instruments _exog_;
 parms b0 b1 b2 b3 b4 b5 b6 b7 b8;
 AvgPrice_change = b0 + b1*search_volume + b2*volume_change + b3*mood_price + b4*mood_TWeconomic + b5*mood_government + b6*mood_possibility + b7*mood_global + b8*mood_investment;
 fit AvgPrice_change / gmm kernel=(bart,11,0) vardef=n;
 run;
 quit; 

In your original code, you spelled search_volume as search_volum (note the missing"e") in the equation. I guess that is the reason.

View solution in original post

9 REPLIES 9
karen8169
Obsidian | Level 7
Data paper;
input date search_volume AvgPrice_change volume_change mood_price mood_TWeconomic mood_government mood_possibility mood_global mood_investment;
datalines;
20131229 31265.96873 -8049968 101.6245784 85.46101172 100.6374401 115.9752537 118.0235693 93.97899654
20140105 27950.70473 -32.37 16673309 101.4670963 85.20483674 99.47578826 116.2290342 117.99756 93.82381802
20140112 25902.91541 34.49 -1744281 101.3045585 84.9599483 98.31558748 116.4796395 117.9683595 93.67532876
20140119 23850.62263 8.1 -2784694 101.1367771 84.74080987 97.1608941 116.7261614 117.9323331 93.54195118
20140126 16471.45342 -76.11 -17009604 100.9635581 84.57583371 96.02679831 116.9660368 117.8800425 93.44019161
20140202 18413.8849 -229.31 9574282 100.7847013 84.52277179 94.96965667 117.1940095 117.7882222 93.40347039
20140209 22096.8015 126.25 7354967 100.6 84.7 94.2 117.4 117.6 93.5
20140216 21174.52948 121.41 -35509 101.0706661 85.3506424 94.50432279 117.5650212 117.1765452 93.86927514
20140223 19110.34379 65.78 -2446057 101.5358183 86.23143162 95.09613037 117.707928 116.6566982 94.37169343
20140302 20039.02689 23.54 5415362 101.9959941 87.22377081 95.76489134 117.8386143 116.0973493 94.93887711
20140309 20082.52542 79.28 -2237921 102.4517257 88.26948972 96.45424708 117.9620219 115.5218055 95.53709453
20140316 18755.35847 -9.17 759321 102.9035397 89.33933393 97.14909964 118.080143 114.9396057 96.14921551
20140323 18181.1214 -156.99 -386470 103.3519585 90.41711766 97.84536379 118.1928278 114.3546296 96.76554749
20140330 16583.05049 262.66 -3366550 103.7975004 91.490956 98.54178229 118.2977235 113.768397 97.37865063
20140406 17277.2075 41.98 5017880 104.2406805 92.54682679 99.23740718 118.3893211 113.1813592 97.9793578
20140413 16706.70072 52.32 -1804624 104.6820111 93.56097486 99.92970051 118.4567229 112.593283 98.55187068
20140420 16448.80356 64.29 3505396 105.1220022 94.48704387 100.6094497 118.4792265 112.0030525 99.06530847
20140427 15159.39418 -281.38 -6300657 105.5611627 95.23096501 101.2423105 118.4179359 111.4077198 99.45718826
20140504 16407.68482 215.73 5698531 106 95.6 101.7 118.2 110.8 99.6
20140511 15863.96562 -2.15 -3449302 105.2148274 95.19833474 101.5032869 117.689092 110.1620765 99.23299517
20140518 14733.00752 7.82 -15661 104.4289314 94.42165813 101.131402 117.0215782 109.5117766 98.61684747
20140525 14988.46355 138.95 3910103 103.6414034 93.46251545 100.7126266 116.2703653 108.8564055 97.87895215
20140601 13836.44918 66.12 -3898532 102.8513332 92.4146101 100.2812996 115.4744435 108.1989573 97.08157585
20140608 14721.77203 47.32 4140873 102.0578073 91.32356274 99.84661271 114.6546858 107.5406598 96.25516597
20140615 14364.49877 42.3 -149009 101.2599086 90.21162401 99.41102646 113.8223066 106.882019 95.41463845
20140622 14247.61966 96.83 -770514 100.4567147 89.08972771 98.97519954 112.9834058 106.223249 94.56735706
20140629 13867.25553 39.38 6887811 99.6472971 87.9634136 98.53930851 112.1414406 105.5644542 93.71707258
20140706 13952.17408 164.83 -325146 98.83072013 86.83582833 98.10340143 111.2986265 104.9057175 92.86592928
20140713 13606.93546 0.54 -918370 98.00603987 85.70942995 97.66749426 110.4568349 104.2471717 92.01561203
20140720 12365.85288 -44.03 -7988279 97.172303 84.58731944 97.23160275 109.6183516 103.5891114 91.16824759
20140727 13382.69317 -37.88 9406327 96.32854576 83.47492055 96.795774 108.786803 102.9322445 90.32754231
20140803 13215.86645 -135.61 -3038838 95.47379277 82.3829178 96.3601809 107.9686256 102.2782929 89.50076485
20140810 12929.63734 -170.46 -2523942 94.60705598 81.33304427 95.92546843 107.175674 101.6314575 88.70263453
20140817 12262.72744 112.9 281306 93.72733345 80.36985449 95.49404583 106.4300251 101.0019889 87.96319539
20140824 11969.15285 170.51 1977123 92.83360826 79.58485954 95.07491354 105.7729235 100.4149026 87.3438882
20140831 12274.05186 81.17 -3339063 91.92484727 79.16609864 94.70169502 105.2814952 99.93124606 86.97041804
20140907 11168.15524 -22.27 -6063453 91 79.5 94.5 105.1 99.7 87.1
20140914 10709.79633 -245.73 4015437 92.86247344 81.38070895 94.93907809 105.4982892 100.0847369 88.25895582
20140921 10817.08069 14.13 2381477 94.70994447 84.01080341 95.54967284 106.2058062 100.7218914 89.91898182
20140928 10663.75135 -202.08 555739 96.54454869 86.99880344 96.2061539 107.0772998 101.4624966 91.8198207
20141005 9763.12662 99.82 -7200394 98.36840687 90.14710652 96.87482219 108.0339656 102.2455358 93.83003752
20141012 10960.82462 -350.86 11107201 100.1836273 93.34494631 97.54639523 109.0315122 103.0460689 95.87670885
20141019 9997.050868 -150.34 -5939264 101.9923084 96.50839046 98.21741005 110.0422145 103.8540284 97.90641251
20141026 9944.235397 54.43 3005273 103.7965409 99.53487456 98.88328534 111.043678 104.6656602 99.85664947
20141102 9784.14586 337.87 -695123 105.5984105 102.2476429 99.52914291 112.0097644 105.4803329 101.6224102
20141109 9546.99488 -71.79 314380 107.4 104.3 100.1 112.9 106.3 103
20141116 9244.900155 65.78 17325 107.1137614 104.9875055 100.3906136 113.6431749 107.1308611 103.5780729
20141123 8808.63662 141.05 -2007912 106.8289945 105.0108012 100.6062109 114.3073978 107.966287 103.7653034
20141130 9175.051622 -106.01 6162136 106.5453701 104.7107263 100.8017273 114.928784 108.8035298 103.7612856
20141207 9101.637737 192.83 -3773128 106.2625603 104.2529501 100.9918666 115.526091 109.6413859 103.6633056
20141214 9172.5426 -243.29 558458 105.9802382 103.7177153 101.1805602 116.1083186 110.4791731 103.5183848
20141221 9123.711552 44.47 659235 105.6980775 103.143305 101.368843 116.6783565 111.3161508 103.3484336
20141228 7537.97184 184.01 -15376329 105.4157519 102.5467811 101.5569268 117.2341545 112.1508902 103.1619725
20150104 8631.193364 75.88 15715797 105.1329351 101.9332268 101.7446246 117.7678923 112.9800594 102.9586901
20150111 8838.39816 -94.29 -1215958 104.8493002 101.2984994 101.9309764 118.2628103 113.7955908 102.7292765
20150118 9033.024336 -14.26 1006714 104.5645194 100.6269873 102.1123252 118.6864184 114.5778228 102.4504429
20150125 8806.864325 290.8 -4007234 104.2782633 99.88315215 102.2749908 118.9773302 115.2787831 102.0724634
20150201 8292.73749 -105.73 -1926215 103.9902012 98.99227849 102.3678625 119.0203884 115.781405 101.4925741
20150208 8117.578392 96.29 -3199204 103.7 97.8 102.2 118.6 115.8 100.5
20150222 6591.595891 117.27 -5681716 100.4025975 93.8762347 99.65545289 115.5624827 112.9907375 96.41397393
20150301 7429.726695 82.72 9511806 98.74542109 91.61746494 98.18301893 113.5652513 111.1458061 93.96348573
20150308 8641.626314 -48.07 1688606 97.08004277 89.28790494 96.69190424 111.4371422 109.2197128 91.41524066
20150315 8644.147128 -33.59 2397045 95.40453741 86.92474241 95.19579544 109.2411834 107.2605892 88.82044782
20150322 8632.189365 176.43 -36298 93.71696819 84.54696258 93.6983737 107.0129085 105.2884851 86.20541569
20150329 8322.389316 -226.5 -7388523 92.01538432 82.1656325 92.20068972 104.7747561 103.3124148 83.58562578
20150405 7574.663565 86.59 291948 90.29781882 79.78989601 90.70326885 102.5451621 101.3380208 80.97401444
20150412 7734.082764 2.67 6631101 88.56228623 77.43192706 89.20716356 100.3460307 99.37237042 78.38789311
20150419 8239.993245 -80.81 5176902 86.80678032 75.11352422 87.71606202 98.21160991 97.42996479 75.85820908
20150426 7965.947754 399.35 -6679423 85.02927178 72.87791905 86.24367723 96.20236985 95.54506699 73.44610063
20150503 7611.97648 -87.67 2149209 83.22770586 70.8131946 84.84122033 94.42950642 93.80083155 71.27560286
20150510 7948.371142 -89.57 34649 81.4 69.1 83.7 93.1 92.4 69.6
20150517 8049.740643 -160.19 1810588 81.80332784 68.1094081 83.53470096 92.60048813 91.83726572 68.93731922
20150524 7569.963872 50.53 -365999 82.1788692 67.47043556 83.63063861 92.54465555 91.61795711 68.76965605
20150531 7514.023004 33.85 1606634 82.52705819 67.00257124 83.79650464 92.72597471 91.53937295 68.84391462
20150607 7687.393563 -363.91 -3053101 82.84829731 66.61799333 83.98108926 93.03401668 91.51845182 69.03641459
20150614 7915.602594 -19.56 -8869002 83.1429579 66.27399626 84.17068452 93.40970316 91.52115568 69.2867286
20150621 6886.880676 -56.9 6446118 83.41138059 65.94985708 84.36162107 93.82136675 91.53353178 69.56535677
20150628 7376.858034 111.2 -986561 83.65387566 65.63560988 84.55291678 94.2519187 91.54985038 69.85794586
20150705 7046.740272 -49.1 250462 83.87072342 65.32664725 84.7443091 94.6919242 91.5677336 70.15761095
20150712 6616.456938 -363.14 1492804 84.06217456 65.02122441 84.93572903 95.1357792 91.58613371 70.46125243
20150719 6883.896656 138.28 -1012797 84.22845038 64.71951407 85.12716286 95.57943954 91.60444244 70.76789785
20150726 6811.449276 -351.76 2591536 84.36974309 64.42370003 85.31862474 96.01878221 91.62197384 71.07818172
20150802 6726.622821 -96.71 -2467667 84.48621602 64.13916011 85.51018505 96.44793455 91.63738107 71.39468492
20150809 6190.303924 -225.9 837044 84.57800381 63.8773793 85.70211132 96.8568946 91.6475114 71.72331535
20150816 6614.64462 -102.73 -961392 84.64521257 63.66217123 85.8954043 97.2274781 91.64472583 72.07646834
20150823 6496.243056 -588.27 6072919 84.68791999 63.54257797 86.09380286 97.52594979 91.61040467 72.47965752
20150830 6772.360023 306.99 -6443063 84.70617543 63.61943611 86.3112747 97.68935333 91.49911757 72.98516327
20150906 6770.10926 -35.86 -2063670 84.7 64.1 86.6 97.6 91.2 73.7
20150913 6673.061307 341.81 -1147600 84.88444623 65.41021135 87.15491213 97.03777899 90.44249953 74.84316328
20150920 6459.860415 71.93 -1159338 85.04466766 67.12168 87.78104647 96.22516514 89.49764482 76.19351728
20150927 6303.013815 -307.35 -6652058 85.18084951 69.02337687 88.42612902 95.28316911 88.47718145 77.64076239
20151004 5344.697037 245.84 5738194 85.29314919 71.00731951 89.0758477 94.2803733 87.42857478 79.1264307
20151011 5971.639212 135.35 4857241 85.38169653 73.01007798 89.72517866 93.26072284 86.37536355 80.61260869
20151018 6417.000734 150.45 -1530612 85.44659389 74.97841489 90.36832135 92.26133301 85.33717184 82.06165551
20151025 6091.730304 78.02 -194664 85.48791627 76.84044669 90.98707721 91.3275291 84.34639288 83.41606707
20151101 5904.13722 -135.28 4424636 85.50571145 78.46670435 91.5143898 90.53121314 83.47572883 84.56771435
20151108 6116.07632 131.14 -3583511 85.5 79.6 91.7 90 82.9 85.3
20151115 5822.92998 -424.55 -1145703 84.88631491 79.71610825 90.60906288 89.96892954 83.04477192 85.17199008
20151122 5767.492714 202.47 -2050808 84.24840717 79.33732238 89.17641702 90.20521808 83.48477546 84.6236336
20151129 5731.552584 -140.76 3725045 83.5855394 78.71785155 87.65230242 90.58442113 84.04573872 83.87001608
20151206 5951.292566 92.64 -1193352 82.89694534 77.98152586 86.10370541 91.04000605 84.65622617 83.01641905
20151213 5652.626049 -373.8 -353441 82.18182898 77.18887517 84.54856292 91.53639163 85.2869063 82.11464026
20151220 5785.745716 169.38 -1598964 81.43936368 76.36991804 82.99169828 92.05452992 85.9256148 81.19070272
20151227 5513.3874 146.13 -8992969 80.66869117 75.54042289 81.43448455 92.5841876 86.56701287 80.25877565
20160103 5094.713425 -58.39 12164545 79.86892056 74.71044964 79.87759543 93.11979924 87.20804829 79.32875429
20160110 5527.809588 -459.99 -1523971 79.03912736 73.88979924 78.32235496 93.65821207 87.84536054 78.41155334
20160117 5461.9691 -177.13 156369 78.17835233 73.09332286 76.77339014 94.1974084 88.47242373 77.52494577
20160124 5318.710272 135.06 3784776 77.28560045 72.34896669 75.24790103 94.73568808 89.07399857 76.70307039
20160131 5400.46584 350.51 -14671978 76.35983973 71.71291047 73.81012021 95.27097946 89.61317631 76.01469435
20160214 4178.142814 -187.59 10544886 76.36728862 71.34595914 72.81394648 96.31692609 90.0149858 75.74557513
20160221 5427.485784 339.14 -20231 77.30050686 71.61515673 73.25555361 96.82731243 89.87761243 76.16488483
20160228 5371.5115 65.59 -1313205 78.20073348 71.99288989 73.78486918 97.33406371 89.67782732 76.71782793
20160306 5165.937 275.36 4877965 79.06900912 72.42324943 74.33766102 97.83861161 89.45251732 77.33579013
20160313 5740.33275 89.74 1191735 79.90633748 72.87883391 74.89673065 98.34149495 89.21686873 77.984939
20160320 5487.371846 79.68 -5660239 80.71368649 73.3459062 75.45745685 98.84257804 88.9772783 78.64812531
20160327 5348.992638 -112.44 -271843 81.49198943 73.81695214 76.01853731 99.3409957 88.73679154 79.31570916
20160403 5426.780965 -108.56 -7778413 82.24214598 74.28661007 76.57937944 99.83480265 88.49769195 79.9804031
20160410 4641.285 -86.2 8104328 82.96502332 74.74876648 77.13891314 100.3201853 88.26344232 80.63337371
20160417 5279.359605 162.84 -687519 83.66145706 75.19324427 77.69344695 100.7899162 88.04162877 81.25951622
20160424 5220.884313 -140.66 -2782584 84.33225226 75.60028983 78.22927238 101.2304259 87.85041018 81.8293742
20160501 5028.013578 -178.79 -1434215 84.97818435 75.9298725 78.69519947 101.6163034 87.73395637 82.28338197
20160508 4828.00368 -205.7 3444823 85.6 76.1 78.9 101.9 87.8 82.5
20160515 4990.55814 -121.44 -3002432 85.08991782 75.94230317 78.12929004 101.9925612 88.31142764 82.23069763
20160522 4925.14642 115.17 2950158 84.55584837 75.6251029 77.09745341 101.9830062 89.00535577 81.72395896
20160529 4966.103024 326.24 3314837 83.99717427 75.23031703 75.99571799 101.9189748 89.7740574 81.10125203
20160605 5009.6448 128.53 -11823405 83.41324971 74.79783531 74.8752725 101.8260319 90.57337579 80.42200794
20160612 4435.354066 29.09 6766040 82.8033997 74.34712766 73.74982087 101.7180268 91.38518363 79.71541332
20160619 4728.062988 -21.98 1352997 82.16691925 73.887791 72.62303741 101.6027051 92.20197179 78.99602373
20160626 4876.042706 -205.97 1867808 81.50307263 73.42474789 71.49592818 101.484848 93.02046527 78.27155006
20160703 4765.53658 322.03 -6029749 80.81109244 72.96091316 70.36884655 101.368209 93.83883888 77.5469835
20160710 4288.459904 -0.09 8840149 80.09017877 72.49877277 69.24220124 101.2570352 94.65516551 76.82726554
20160717 4874.674527 224.38 -286372 79.33949827 72.04173053 68.11727507 101.1577886 95.46577777 76.11993141
20160724 4955.11527 77.75 -1708660 78.55818317 71.59595192 66.99879511 101.0817639 96.26215009 75.43914106
20160731 4766.036 -21.62 -1875898 77.74533029 71.17370391 65.90440311 101.049666 97.02365051 74.81325397
20160807 4671.079296 114.33 1505199 76.9 70.8 64.9 101.1 97.7 74.3
20160814 4751.418455 29.29 -218000 77.14196954 70.52615005 64.23177555 101.3046738 98.16852675 74.01736186
20160821 4553.755556 -147.68 -1827657 77.3507642 70.30089661 63.65354016 101.5918086 98.55189175 73.8474285
20160828 4579.152453 112.85 1070084 77.52662534 70.09930697 63.09939338 101.9229408 98.90035395 73.73258004
20160904 4650.93738 -85.15 2827400 77.66975625 69.90926713 62.55169524 102.2774351 99.23449902 73.64466417
20160911 4853.76 -0.87 -12242308 77.78032239 69.72491958 62.00572535 102.6441232 99.56274057 73.56993609
20160918 3653.548384 -28.1 7674658 77.85845156 69.54349032 61.46022579 103.0167778 99.88847326 73.50170579
20160925 4451.08752 225.93 -8661369 77.90423409 69.36378622 60.91488093 103.3915895 100.2129588 73.43675925
20161002 3707.56604 -9.82 5415594 77.91772289 69.18554864 60.36968507 103.7656229 100.5363985 73.37363907
20161009 4481.242982 92.27 -1090716 77.89893356 69.00931336 59.82493105 104.1356272 100.8581046 73.31186484
20161016 4135.71384 -161.12 2768651 77.84784437 68.83670082 59.28179686 104.496719 101.1759157 73.25167621
20161023 4343.89755 183.27 -492913 77.76439628 68.6712939 58.7447058 104.8404034 101.4843585 73.19416102
20161030 4125.372995 -50.74 -1816776 77.64849282 68.52057873 58.23018832 105.1511315 101.7699954 73.14183724
20161106 4042.326155 -180.23 6966518 77.5 68.4 57.8 105.4 102 73.1
;
proc model data=paper;
 exog search_volume volume_change mood_price mood_TWeconomic mood_government mood_possibility mood_global mood_investment;
 instruments _exog_;
 parms b0 b1 b2 b3 b4 b5 b6 b7 b8;
 AvgPrice_change = b0 + b1*search_volum + b2*volume_change + b3*mood_price + b4*mood_TWeconomic + b5*mood_government + b6*mood_possibility + b7*mood_global + b8*mood_investment;
 fit AvgPrice_change / gmm kernel=(bart,11,0) vardef=n;
 run;
 quit; 

 

The code can't run. But I'm confused by the bug in the log.txt.

By the way, I want to ask how to run a function in different period.

ex.

AvgPrice_change(t) = b0 + b1*search_volum(t-1) + b2*volume_change(t-2) + b3*mood_price(t)

 

Thanks a million.

Kurt_Bremser
Super User

Disclaimer: I have absolutely no idea what proc model does, I'm just a data architect/engineer.

 

But from the log I guess SAS is complaining that you have 9 parameters in the parameters statement, but only 8 defined instruments via _exog and the exogenous statement. Somehow these must fit when only 1 equation is used.

karen8169
Obsidian | Level 7

Yes, I know what you say. But I  set parms from b0 to b8. I don't know why search_volume appears when I get the result.

parms b0 b1 b2 b3 b4 b5 b6 b7 b8

 

Kurt_Bremser
Super User

I think I've found something:

proc model data=paper;
 exog search_volume volume_change mood_price mood_TWeconomic mood_government mood_possibility mood_global mood_investment;
 instruments _exog_;
 parms b0 b1 b2 b3 b4 b5 b6 b7 b8;
 AvgPrice_change = b0 + b1*search_volume + b2*volume_change + b3*mood_price + b4*mood_TWeconomic + b5*mood_government + b6*mood_possibility + b7*mood_global + b8*mood_investment;
 fit AvgPrice_change / gmm kernel=(bart,11,0) vardef=n;
 run;
 quit; 

In your original code, you spelled search_volume as search_volum (note the missing"e") in the equation. I guess that is the reason.

karen8169
Obsidian | Level 7

Thanks, I solve the first question. And I want to ask how to run the regression in different periods.

karen8169
Obsidian | Level 7

Well, I have used "by statement" and I think that it is used to categorize the data. But I want to run each variable, which starts in the different week so that the amount of the data will decrease. The form of model is like arma. Thanks.

ex.

    AvgPrice_change(t) = b0 + b1*search_volum(t-1) + b2*volume_change(t-2) + b3*mood_price(t)

BCO
Calcite | Level 5 BCO
Calcite | Level 5

Sort your dataset by time.  Create new variables that equal the lagged value of the variables you are regressing on.  Then run the model with the newly created lagged variables.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 9 replies
  • 2473 views
  • 0 likes
  • 3 in conversation