Announcement

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

  • Root Mean Square Error

    Dear Stata User.

    I'm trying to make a plot of predictor vs observer of my dependent variable. I found the command Residual vs Predictor in the regression diagnostic plot in Grapichs. However the command ask me to select a independent variable, and stata make a graphic under the independent variable.

    So, my question is, how to make a plot of predictor vs observer of my dependent variable to validate my prediction.

    Also I have three models, the clasical OLS, and a Spatial Error and Spatial Lag model (Pisati, models 2012), so will it be the same command to the three models?

    Thank you in advance.

  • #2
    To get a predicted-versus-observed plot after regress, you could try something analogous to the following.
    Code:
    sysuse auto, clear
    regress price c.mpg
    *
    * Begin here
    *
    predict double price_hat, xb
    pause on
    graph twoway scatter price_hat price, mcolor(black) msize(small) || ///
        line price price, lcolor(black) lpattern(dash) ///
        ylabel( , angle(horizontal) nogrid) ytitle(Predictions) legend(off)
    
    pause
    *
    * Also consider this:
    rvfplot , mcolor(black) msize(small) yline(0, lcolor(black) lpattern(dash)) ///
        ylabel( , angle(horizontal) nogrid)
    
    exit
    I can't help you with "Spatial Error and Spatial Lag model (Pisati, models 2012)".

    Comment


    • #3
      I don't understand what the question has to do with root mean square error.

      Also, like Joseph I take predictor here to mean predicted and observer to mean observed.

      "versus" divides the world, although I'd assert that the terminology "<y-axis variable>" versus <x-axis variable>" fits the standard mathematical idea of y as a function of x. It's a fuzzy memory now, but I think I recollect this terminology from secondary (high) school science as just the way all the science teachers talked.

      I don't know what rationale people have who use the opposite terminology. (Sound of grinding axes....)

      A fairly general ovfplot command was published in

      SJ-4-4 gr0009 . . . . . . . . . . Speaking Stata: Graphing model diagnostics
      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N. J. Cox
      (help anovaplot, indexplot, modeldiag, ofrtplot, ovfplot,
      qfrplot, racplot, rdplot, regplot, rhetplot, rvfplot2,
      rvlrplot, rvpplot2 if installed)
      Q4/04 SJ 4(4):449--475
      plotting diagnostic information calculated from residuals
      and fitted values from regression models with continuous
      responses

      and updated in Stata Journal 10(1). The rather ugly name is a contraction of observed vs fitted plot.

      I don't know whether it will work with the unexplained spatial models you allude but do not reference properly. Please see FAQ Advice:

      13. Literature references

      Please give precise literature references. The literature familiar to you will be not be familiar to all members of Statalist. Do not refer to publications with just author and date, as in Sue, Grabbit, and Runne (1989).
      References should be in a form that you would expect in an academic publication or technical document. Good practice is to give a web link accessible to all or alternatively full author name(s), date, paper title, journal title, and volume and page numbers in the case of a journal article.
      Last edited by Nick Cox; 22 Dec 2014, 02:33.

      Comment


      • #4

        Dear Joseph Coveney and Nick Cox

        Thank you so much for your feedback. You are right Nick Cox. Apologies for don't give precise literature references and also for mix two different criteria, as root mse and validate the predictors.
        The article "Graphics before and after model fitting" is quite useful, be sure I'll quote it as you suggest me. Thank you again for sharing your knowledge.

        Please find here information about spatial error and spatial lag model here: http://www.stata.com/meeting/italy12...12_pisati.pdf:

        The commands I'm using are here:
        Pisati, M. (2012) Spautoreg: Spatial Cross Sections Regression Models:(SAR - SEM - SDM - SAC - SARARGS - SARARIV - SARARML - SPGMMGS2SLS - GS2SLSAR - GS3SLS - GS3SLSAR - IVTOBIT) in: http://fmwww.bc.edu/repec/bocode/s/spautoreg.html. Last accessed: 22th December, 2014.



        Happy holidays.

        Comment

        Working...
        X