Coder Social home page Coder Social logo

stata's Introduction

Stata

Some of my Stata ados not distributed elsewhere. Send questions via email.

mcrnj.ado, mcrnj.sthlp

Prepares a method comparison two-panel plot. Here is an example

The left panel is a scatterplot mcrnj prepares a two-panel plot. The left panel is a scatterplot of yvar by xvar. Reference lines at yvar=xvar and yvar = xvar ± caliper are shown. The points in the scatterplot are colored according to whether they are within or outside of the caliper. A predicted line using restricted cubic spline regression of yvar on xvar (modeltype(rcs) is the default option) or Deming regression (modeltype(deming)) is shown. Two sets of $1-t({\alpha/2},N-2})$ confidence regions are plotted based on this regression. The narrower (gold color) uses the standard error of estimate, and is appropriate for comparing within the sample (i.e., can I treat these two measures as eqiuvalent in this sample?). The other is somewhat wider (taupe color) and uses the standard error of prediction, and is appropriate for making inferences regarding whether the two measures are equivalent for future samples.

The right panel is the scatterplot with yvar and derived variables centered at xvar.

Note: the use of the modeltype(deming) option requires that the deming module is installed. If you don't have it installed try typing findit deming.

Example

mcrnj gcp5 gcp6 , modeltype(rcs) ytitle(Video) xtitle(Telephone) note(regression using restricted cubic splines for telephone)

mcrnj gcp5 gcp6 , modeltype(deming) ytitle(Video) xtitle(Telephone) note(regression using Deming regression for telephone)

Notes

Using alpha(.1) will provide 90% confidence intervals. These can be used to approximate two 1-sided t-tests at the 5% significance level that the $E(yvar|f(xvar))$ is greater than (or less than) the caliper. This is an equivalence test of the two measures. (Of course, one could also present 95% CIs and approximate two t-tests at the 2.5% significance level.)

Deming regression is an approach used often in clinical chemsitry to compare two measures. It allows for measurement error in xvar.

stata's People

Contributors

rnj0nes avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.