EDIT: Originally, I asked about why the code failed when I tried to merge in _Y_synthetic to the default dataframe. The below code works, but I still don't know why.
The underscores are obviously the offending characters that must be removed, but is there any reason why this would be? Perhaps it's a question for someone from Statacorp.
Code:
* Example generated by -dataex-. For more info, type help dataex clear * input float(cigsale year) double cf 123 1970 122.1653883469584 121 1971 121.62029507356708 123.5 1972 123.65802631119759 124.4 1973 124.1292205815946 126.7 1974 126.80849818612906 127.1 1975 126.6901995266301 128 1976 128.01968539874275 126.4 1977 126.562557509494 126.1 1978 125.43148186489528 121.9 1979 122.38722170060387 120.2 1980 119.90265624361437 118.6 1981 119.11404085777194 115.4 1982 115.64496634374335 110.8 1983 111.00762282380802 104.8 1984 104.55046091349114 102.8 1985 102.69997984676596 99.7 1986 99.30180693683437 97.5 1987 97.31873278154471 90.1 1988 90.98715875261351 82.4 1989 88.49250142078927 77.8 1990 85.0805673074476 68.7 1991 80.71134376817638 67.5 1992 78.99709312992486 63.4 1993 79.32651527790523 58.6 1994 76.78981514810624 56.4 1995 74.29330974832727 54.5 1996 73.51829128134756 53.8 1997 73.5041003462229 52.3 1998 71.4293293399428 47.2 1999 70.77370328388332 41.6 2000 65.60763767351816 end format %ty year frame create adhframe frame change adhframe * Example generated by -dataex-. For more info, type help dataex clear input double(_Y_synthetic year) 117.1224998779297 1970 118.92689856719971 1971 124.31680255126952 1972 125.48379851531983 1973 127.0066996688843 1974 127.11689948272705 1975 127.89249899291993 1976 125.75760092926026 1977 125.00309838867187 1978 122.94150092315672 1979 120.48190029907228 1980 120.21059833526611 1981 116.87670102691649 1982 111.32929905700684 1983 103.35900167083742 1984 103.23869921874999 1985 99.83780280303955 1986 99.7549978942871 1987 91.67349821472168 1988 90.0025983352661 1989 87.5086008682251 1990 82.15799961090087 1991 81.58240018463135 1992 81.16239954757691 1993 80.69319806289674 1994 78.45580081176757 1995 77.44370036315918 1996 77.66760053634644 1997 74.3454993095398 1998 73.53380042648314 1999 67.3186996383667 2000 end rename _Y_synthetic ysyn frame change default cls frlink 1:1 year, frame(adhframe) frget ysyn, from(adhframe) br
Comment