Announcement

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

  • Invalid variable and operator

    Hi, I am having trouble with this data set. Any time I run a regression it shows this invalid 'variable' r(198) but also it is not recognizing i. as a valid operator. I am able to create histograms, correlation tables, and many other opeations with these varaibels but I cannot do regressions. What is going on?


    . describe price_usd bedrooms full_bathrooms parking_lots covered_area Notcovered_area property_ag
    > e NewProperty Apartment House DC Carabobo neighborhood

    storage display value
    variable name type format label variable label
    --------------------------------------------------------------------------------------------------
    price_usd double %10.0g price_usd
    bedrooms long %10.0g bedrooms
    full_bathrooms long %10.0g full_bathrooms
    parking_lots long %10.0g parking_lots
    covered_area double %10.0g covered_area
    Notcovered_area float %9.0g
    property_age double %10.0g property_age
    NewProperty float %9.0g
    Apartment float %9.0g
    House float %9.0g
    DC float %9.0g
    Carabobo float %9.0g
    neighborhood str28 %28s neighborhood

    .
    .
    . reg price_usd = full_bathrooms bedrooms parking_lots covered_area Notcovered_area property_age N
    > ewProperty Apartment House DC Carabobo i.neighborhood, robust cluster (city)
    invalid 'bedrooms'
    r(198);

    end of do-file

    r(198);


    . reg price_usd = i.neighborhood full_bathrooms bedrooms parking_lots covered_area Notcovered_area
    > property_age NewProperty Apartment House DC Carabobo, robust cluster (city)
    i: operator invalid
    r(198);






  • #2
    Stata is confused. The = sign does not belong in your syntax for what you want. Perhaps you are thinking in terms of syntax that works somewhere else.

    Comment


    • #3
      What a stupid mistake. Shame on me. Thank you for your time

      Comment

      Working...
      X