Data visualization with SAS programming

Re: SGPLOT density

Occasional Contributor
Posts: 12

Re: SGPLOT density

[ Edited ]

I'm talking about the simple "proc sgplot data=filename; density var; run;" command here, that is "normal". My question regards the estimation of SD and mean. As mentioned earlier, it's only logical to use the sample attributes as parameters but in theory there are other options to fit a normal distribution curve to a given distribution. I'm also a bit suspicious because the documentation presents options to manipulate the curve parameters.

Posts: 3,954

Re: SGPLOT density

PROC SGPLOT only supports the most frequently used options. For TYPE=NORMAL, that means sample mean and std dev or specified parameter values.


The HISTOGRAM statement in PROC UNIVARIATE provides more support and a wide range of distributions that you can fit. The HISTOGRAM statement also enables you to specify some parameters, but have others chosen automatically, typically by using MLE or method of moments.


What options are you looking for? In general, if you want a complicated estimate (such as MLE), you should use a SAS statistical procedure (maybe PROC GENMOD or NLIN or IML) to compute the parameter estimates and then type the parameter values into the SGPLOT procedure.


If you link to the documentation that presents "suspicious" results, perhaps we can explain what you are seeing.

Ask a Question
Discussion stats
  • 1 reply
  • 1 like
  • 2 in conversation