{ "info": { "author": "Phillip M. Feldman", "author_email": "Phillip.M.Feldman@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable" ], "description": "OVERVIEW\r\n========\r\n\r\nMost of us are familiar with the charts that pediatricians use that show\r\npercentiles of weight and height as a function of age; generating such a chart\r\nfrom a small sample of data requires quantile regression or similar methods.\r\n(When working with a large enough sample of data, one can bin the data, i.e.,\r\ndivide the x-axis into intervals and calculate percentiles independently for\r\neach interval. But, this approach uses the data inefficiently and is unworkable\r\nwhen sample sizes are small).\r\n\r\nQuantiles and percentiles are the same except for a factor of 100, e.g., the\r\n30th percentile is the 0.3 quantile.\r\n\r\nThis Python script demonstrates that one can perform quantile regression using\r\nonly Python, NumPy, and SciPy. The only other dependency is on matplotlib,\r\nwhich is used to plot the data and the quantile estimates.\r\n\r\n\r\nDETAILS\r\n=======\r\n\r\nIn detail, the script does the following:\r\n\r\n(1) Model parameters are assigned. (Currently, these are hardwired into the\r\ncode).\r\n\r\n(2) The program generates an artificial bivariate sample of data (x, y) as\r\nfollows:\r\n\r\n - x is generated by drawing from a distribution that is uniform on [x_min, x_max], where x_min and x_max are currently 0 and 1, respectively.\r\n\r\n - y is then generated according to a normal distribution having mean -0.5 + x and standard deviation 1.0 + 0.5 * x.\r\n\r\n (All of this can be changed, e.g., one could choose to make the mean of y quadratic in x).\r\n\r\n(3) The code defines an objective function based on the tilted absolute value\r\nfunction (see references for motivation).\r\n\r\n(4) The SciPy optimization package is then used to optimize (minimize) the\r\nobjective function.\r\n\r\n(5) Using the matplotlib module, the code plots a scatter diagram of the data\r\nwith an overlay of percentile lines.", "description_content_type": null, "docs_url": null, "download_url": "http://phillipmfeldman.org/Python/index.html", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://phillipmfeldman.org", "keywords": "quantile regression,regression,statistics", "license": "MIT License", "maintainer": "Phillip M. Feldman", "maintainer_email": "Phillip.M.Feldman@gmail.com", "name": "quantile_regression_demo", "package_url": "https://pypi.org/project/quantile_regression_demo/", "platform": "", "project_url": "https://pypi.org/project/quantile_regression_demo/", "project_urls": { "Download": "http://phillipmfeldman.org/Python/index.html", "Homepage": "http://phillipmfeldman.org" }, "release_url": "https://pypi.org/project/quantile_regression_demo/1.0/", "requires_dist": null, "requires_python": null, "summary": "demonstration of quantile regression", "version": "1.0" }, "last_serial": 576854, "releases": { "1.0": [] }, "urls": [] }