[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: string functions on the name of a variable
I have the following problem and would be grateful if you could provide some help:
Suppose I have a regression equation with lntoen as my dependent variable and a lot of right hand side variables called lncllisqr lncllica lncllite lncaclli (and there are more variables like these which contain the word "clli" in their name as well as other variables named differently). After estimation, I am trying to add the coefficients of all variables in an estimation that have "clli" in their names. While I can do this manually by using _b[variablename], I am faced with a problem as I am estimating a Flexible Fourrier function, which tends to be very messy in terms of the addition of trigonometric terms.
I am trying to differentiate lntoen with respect to all variables that contain "clli" in their names. I am trying to automate this process by asking stata to add the coefficients of all variables that contain "clli" in their names.
Does anybody know if there is an equivalent to one of the list of string functions (such as e.g. substr) that can allow me to write some condition to check if the variable contains the characters "clli" in its name and then add their coefficients please?
Apologies if a similar posting has been up on the list before and escaped my attention.
This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
* For searches and help try: