Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Creating a max value variable.

    I have panel data by county(i) and year(t). I want to create a damage function as follows.

    Damage = [max(WindSpeed_{it} - 50, 0)^3] / max(Windspeed)^3

    I had tried the following code but it I get "unknown egen function"

    by fips, sort: egen Damage_Sust = ((max(vmax_sust-25.72,0)^3)/(max(vmax_sust)^3))

  • #2
    Duplicate post: asked and answered at https://www.statalist.org/forums/for...-my-panel-data.

    Anupam Ghosh Reposting your question shortly after you first asked it is ineffective here on Statalist. This is not a help line or a consultation service. The people who respond here are all volunteers, and we are free to respond to whatever we choose. If you need help with something in the span of less than a day, this is probably not the right place to come to. Sometimes you will get a very rapid response--but that is just a matter of chance, who saw your post and when they happened to see it. You should not consider your post abandoned if it has been up for less than 24 hours here. And, as in this case, when it is a weekend and traffic is light on the Forum, you really should expect turnaround to take up to 48 hours.

    If your post goes unanswered for 24-48 hours, reposting the same question is unlikely to get a response. It is likely in this case that your question went unanswered because it was unclearly asked, or too esoteric and not within anybody here's area of knowledge and interest, or too long, or contained insufficient information for the question to even be answered at all. So if you are going to re-post you should revise your question so as to try to overcome such difficulties. Do read the Forum FAQ for excellent advice on how to ask questions in ways that maximize your chance of getting a timely and helpful response.

    Comment

    Working...
    X