Hi everyone!
I am trying to normalise the Idexmsa to 1. I have tried the code:
g Indexmsanor = (Indexmsa - min(Indexmsa))/(max(Indexmsa)- min(Indexmsa))
This gives me the result invalid syntax. I however do not see where it would be a syntax error. I have provided a small snapshot of the database below. The actual database exist of more than 40K observations.
Thanks in advance!
Rick
I am trying to normalise the Idexmsa to 1. I have tried the code:
g Indexmsanor = (Indexmsa - min(Indexmsa))/(max(Indexmsa)- min(Indexmsa))
This gives me the result invalid syntax. I however do not see where it would be a syntax error. I have provided a small snapshot of the database below. The actual database exist of more than 40K observations.
Thanks in advance!
Rick
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long gvkey double year float Indexmsa 1004 1992 . 1004 1993 2.3308494 1004 1994 2.406004 1004 1995 2.506281 1004 1996 2.574835 1004 1997 2.651267 1004 1998 2.713008 1004 1999 2.817756 1004 2000 3.041942 1004 2001 3.227166 1004 2002 3.4175005 1004 2003 3.5546095 1004 2004 3.852246 1004 2005 4.2420692 1004 2006 4.510326 1004 2007 4.5599318 1004 2008 4.3738556 1004 2009 3.9382584 1004 2010 3.618267 1004 2011 3.3870556 1004 2012 3.260166 1004 2013 3.2980626 1004 2014 3.475623 1004 2015 3.596338 1004 2016 3.7176924 1004 2017 3.8422396 1004 2018 3.956994 1004 2019 4.067277 1004 2020 4.1092186 1010 1992 . 1010 1993 . 1010 1994 . 1010 1995 . 1010 1996 . 1010 1997 . 1010 1998 . 1010 1999 . 1010 2000 . 1010 2001 . 1010 2002 . 1010 2003 . 1013 1992 . 1013 1993 . 1013 1994 . 1013 1995 . 1013 1996 . 1013 1997 . 1013 1998 . 1013 1999 . 1013 2000 . 1013 2001 . 1013 2002 . 1013 2003 . 1013 2004 . 1013 2005 . 1013 2006 . 1013 2007 . 1013 2008 . 1013 2009 . 1013 2010 . 1019 1992 . 1019 1993 . 1019 1994 . 1019 1995 . 1019 1996 . 1019 1997 . 1019 1998 . 1019 1999 . 1019 2000 . 1019 2001 . 1019 2002 . 1019 2003 . 1019 2004 . 1019 2005 . 1019 2006 . 1019 2007 . 1019 2008 . 1019 2009 . 1019 2010 . 1019 2011 . 1019 2012 . 1025 1992 . 1025 1993 1 1025 1994 1.0023696 1025 1995 1.0055636 1034 1992 . 1034 1993 1.9326962 1034 1994 1.937276 1034 1995 1.9434488 1034 1996 1.9802867 1034 1997 2.0266826 1034 1998 2.1264436 1034 1999 2.26822 1034 2000 2.577857 1034 2001 2.844285 1034 2002 3.16368 1034 2003 3.446037 1034 2004 3.925329 1034 2005 4.555556 1034 2006 4.908602 end

Comment