Thank you for your replies. It is very helpful for me. The data I am working with contains sensitive information and I do not have the permission to share it, otherwise I would have sent a sample.  The command  worked but now I encountered another problem. The message is "data types not conformable for  operation". Gretl asked for the aggregation option. But I do not  want to aggregate.  The right-hand variables have more than one match with the left-hand variables.  The files contain both numerical and string variables that need to be matched (the count of matches is not helping). For example one column on the right-hand that needs to be matched to the left-hand  through variable NUMBER (numerical variable) looks similar to this:

TYPEOFCONTROL (name)
type2
type2
type2
type3
type4
...

Is it possible through the JOIN function to get it in numerical form  after matching, or they need to be numerical before matching? I need the exact variable to be "joined" to the left-hand. I know that Gretl transforms the categorical variables into numerical ones (that can later be  transformed into dummies) when importing the data.

Example:
TYPEOFCONTROL (is it possible to get it sth like this after matching?)
1
1
1
2
3

/Andreea




On Sat, Aug 3, 2013 at 4:56 PM, Allin Cottrell <cottrell@wfu.edu> wrote:
On Sat, 3 Aug 2013, Andreea Bolos wrote:

> Thank you for your answers. I need to join 2 files and the Key-matching is
> NUMBER variable that is included in both files. Not all observations from
> left-hand/inner  will match with the ones from right-hand/outer. My
> commands were:
> "open /Users/andreea/Desktop/Test1Gretl.csv __quiet
> join /Users/andreea/Desktop/Test2Gretl.csv CONTRTYPE __ikey=NUMBER
> print __byobs"

The option-leader in gretl is two dashes (--), not two
underscores. In the first command the string "__quiet" is
simply ignored (which probably should count as a bug), but in
the join command, for which parsing is stricter, the
underscores will generate a syntax error.

Just in case you actually used dashes in your script, another
point to bear in mind is that in gretl variable names are case
sensitive, so the join cammand will fail unless the key
variable is really called NUMBER (all caps).

Allin Cottrell
_______________________________________________
Gretl-users mailing list
Gretl-users@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users