Posts Tagged ‘ Statistical Programming ’

Quadratic optimization in SAS

April 12, 2017
By
Quadratic optimization in SAS

At SAS Global Forum last week, I saw a poster that used SAS/IML to optimized a quadratic objective function that arises in financial portfolio management (Xia, Eberhardt, and Kastin, 2017). The authors used the Newton-Raphson optimizer (NLPNRA routine) in SAS/IML to optimize a hypothetical portfolio of assets. The Newton-Raphson algorithm [...] The post Quadratic optimization in SAS appeared first on The DO Loop.

Read more »

A simple trick to construct symmetric intervals

April 10, 2017
By
A simple trick to construct symmetric intervals

Many intervals in statistics have the form p ± δ, where p is a point estimate and δ is the radius (or half-width) of the interval. (For example, many two-sided confidence intervals have this form, where δ is proportional to the standard error.) Many years ago I wrote an article [...] The post A simple trick to construct symmetric intervals appeared first on The DO Loop.

Read more »

Nonsmooth models and spline effects

April 5, 2017
By
Nonsmooth models and spline effects

Most regression models try to model a response variable by using a smooth function of the explanatory variables. However, if the data are generated from some nonsmooth process, then it makes sense to use a regression function that is not smooth. A simple way to model a discontinuous process in [...] The post Nonsmooth models and spline effects appeared first on The DO Loop.

Read more »

Print tables in SAS/IML

April 3, 2017
By
Print tables in SAS/IML

One of the advantages of the new mixed-type tables in SAS/IML 14.2 (released with SAS 9.4m4) is the greatly enhanced printing functionality. You can control which rows and columns are printed, specify formats for individual columns, and even use templates to completely customize how tables are printed. Printing a table [...] The post Print tables in SAS/IML appeared first on The DO Loop.

Read more »

Lists: Nonmatrix data structures in SAS/IML

March 29, 2017
By
Lists: Nonmatrix data structures in SAS/IML

Lists are collections of objects. SAS/IML 14.2 supports lists as a way to store matrices, data tables, and other lists in a single object that you can pass to functions. SAS/IML lists automatically grow if you add new items to them and shrink if you remove items. You can also [...] The post Lists: Nonmatrix data structures in SAS/IML appeared first on The DO Loop.

Read more »

Data tables: Nonmatrix data structures in SAS/IML

March 22, 2017
By
Data tables: Nonmatrix data structures in SAS/IML

Prior to SAS/IML 14.2, every variable in the Interactive Matrix Language (IML) represented a matrix. That changed when SAS/IML 14.2 (released with SAS 9.4m4) introduced two new data structures: data tables and lists. This article gives an overview of data tables. I will blog about lists in a separate article. [...] The post Data tables: Nonmatrix data structures in SAS/IML appeared first on The DO Loop.

Read more »

Simultaneous confidence intervals for multinomial proportions

February 15, 2017
By
Simultaneous confidence intervals for multinomial proportions

A categorical response variable can take on k different values. If you have a random sample from a multinomial response, the sample proportions estimate the proportion of each category in the population. This article describes how to construct simultaneous confidence intervals for the proportions as described in the 1997 paper [...] The post Simultaneous confidence intervals for multinomial proportions appeared first on The DO Loop.

Read more »

An easy way to run thousands of regressions in SAS

February 13, 2017
By
An easy way to run thousands of regressions in SAS

A common question on SAS discussion forums is how to repeat an analysis multiple times. Most programmers know that the most efficient way to analyze one model across many subsets of the data (perhaps each country or each state) is to sort the data and use a BY statement to [...] The post An easy way to run thousands of regressions in SAS appeared first on The DO Loop.

Read more »

Winsorization: The good, the bad, and the ugly

February 8, 2017
By
Winsorization: The good, the bad, and the ugly

On discussion forums, I often see questions that ask how to Winsorize variables in SAS. For example, here are some typical questions from the SAS Support Community: I want an efficient way of replacing (upper) extreme values with (95th) percentile. I have a data set with around 600 variables and [...] The post Winsorization: The good, the bad, and the ugly appeared first on The DO Loop.

Read more »

Simulate many samples from a linear regression model

February 1, 2017
By
Simulate many samples from a linear regression model

In a previous article, I showed how to simulate data for a linear regression model with an arbitrary number of continuous explanatory variables. To keep the discussion simple, I simulated a single sample with N observations and p variables. However, to use Monte Carlo methods to approximate the sampling distribution [...] The post Simulate many samples from a linear regression model appeared first on The DO Loop.

Read more »


Subscribe

Email:

  Subscribe