IDEAS home Printed from https://ideas.repec.org/p/boc/scon14/16.html
   My bibliography  Save this paper

bipolate: A Stata Command for Bivariate Interpolation with Particular Application to 3D Graphing

Author

Listed:
  • Joseph Canner

    (Johns Hopkins University School of Medicine)

  • : Xuan Hui

    (Johns Hopkins University School of Medicine)

  • Eric Schneider

    (Johns Hopkins University School of Medicine)

Abstract

Stata has a variety of flexible commands for graphing in two dimensions; however, it has few options for graphing in three dimensions. The user-written surface command by Adrian Mander, available from SSC, attempts to fill this gap, providing both 3D wire-frame plots and dropline plots. However, when some (x,y) combinations do not have a corresponding z-value, the graphs produced by surface are often unintelligible. SAS addresses this problem with PROC G3GRID, which creates a data set of interpolated values, providing a smooth surface plot when used as input for PROC G3D. The default method of interpolation used by PROC G3GRID was proposed by Hiroshi Akima in 1978. To reproduce this functionality in Stata, we used a publicly-available Fortran implementation of Akima’s method. We converted these Fortran subroutines into Mata and created the Stata command bipolate to interface with these subroutines. The bipolate command contains options for interpolating z-values at all possible combinations of the specified x- and y-values and for specifying specific (x,y) combinations at which to interpolate. There is also an option for handling multiple z-values for a given (x,y). Examples will be provided to illustrate the use of surface, with and without bipolate, and to illustrate various bipolate options.

Suggested Citation

  • Joseph Canner & : Xuan Hui & Eric Schneider, 2014. "bipolate: A Stata Command for Bivariate Interpolation with Particular Application to 3D Graphing," 2014 Stata Conference 16, Stata Users Group.
  • Handle: RePEc:boc:scon14:16
    as

    Download full text from publisher

    File URL: http://repec.org/bos2014/boston14_canner.pptx
    Download Restriction: no
    ---><---

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:boc:scon14:16. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Christopher F Baum (email available below). General contact details of provider: https://edirc.repec.org/data/stataea.html .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.