BookmarkSubscribeRSS Feed
Abdulaziz98
Calcite | Level 5

Good evening

 

Considering that i have Poisson distribution. How can i calculate the Maximum Likelihood Estimators (MLE) for each of samples?
(there will be a total of 10,000 Maximum Likelihood Estimators since i have a 10,000 samples of size 25( n=25))

Thank in advanced 😊

2 REPLIES 2
FreelanceReinh
Jade | Level 19

Good evening, @Abdulaziz98, and welcome to the SAS Support Communities!

 

Create a SAS dataset ("HAVE") consisting of all 10,000 samples (i.e., 250,000 observations), sorted* by sample number, say, SAMPNO=1, ..., 10000. (You may already have some existing sample ID that you can use instead of SAMPNO.) Then use PROC SUMMARY to compute the sample means of the variable (let me call it X) containing the values from a Poisson distribution:

 

proc summary data=have;
by sampno;
var x;
output out=want(drop=_:) mean=MLE;
run;

The resulting dataset WANT will contain the maximum likelihood estimate (MLE) of the Poisson parameter for each sample, i.e., 10,000 observations with SAMPNO and MLE.

 

* Edit: If your dataset is not sorted, but grouped by sample number (i.e., the first 25 observations are from one sample, the next 25 constitute another sample and so on, but the sample numbers are not in ascending or descending order), add the keyword NOTSORTED to the BY statement:

by sampno notsorted; 

 

Abdulaziz98
Calcite | Level 5
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="Generator" content="Microsoft Word 15 (filtered medium)" />&lt;!--&lt;br&gt;/* Font Definitions */&lt;br&gt;@font-face&lt;br&gt; {font-family:"Cambria Math";&lt;br&gt; panose-1:2 4 5 3 5 4 6 3 2 4;}&lt;br&gt;@font-face&lt;br&gt; {font-family:Calibri;&lt;br&gt; panose-1:2 15 5 2 2 2 4 3 2 4;}&lt;br&gt;/* Style Definitions */&lt;br&gt;p.MsoNormal, li.MsoNormal, div.MsoNormal&lt;br&gt; {margin:0in;&lt;br&gt; font-size:11.0pt;&lt;br&gt; font-family:"Calibri",sans-serif;}&lt;br&gt;a:link, span.MsoHyperlink&lt;br&gt; {mso-style-priority:99;&lt;br&gt; color:blue;&lt;br&gt; text-decoration:underline;}&lt;br&gt;.MsoChpDefault&lt;br&gt; {mso-style-type:export-only;}&lt;br&gt;@page WordSection1&lt;br&gt; {size:8.5in 11.0in;&lt;br&gt; margin:1.0in 1.25in 1.0in 1.25in;}&lt;br&gt;div.WordSection1&lt;br&gt; {page:WordSection1;}&lt;br&gt;&lt;br&gt;

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 352 views
  • 2 likes
  • 2 in conversation