<div dir="ltr">Thanks Ezra.<div><br></div><div>Also, it looks like I made a typo in my email. When I wrote:</div><div><br></div><div><span style="color:rgb(80,0,80)">&quot;Also, it would be great if someone could provide guidance about which of these metrics </span><span style="color:rgb(80,0,80)">(margin of error vs <b>standard deviation</b>) is better to report along with the esimate.&quot;</span><br></div><div><span style="color:rgb(80,0,80)"><br></span></div><div><span style="color:rgb(80,0,80)">I meant to write &quot;standard error&quot;.</span></div><div><span style="color:rgb(80,0,80)"><br></span></div><div><span style="color:rgb(80,0,80)">I will plan to do what you suggested, and report the 90% margin of error.</span></div><div><span style="color:rgb(80,0,80)"><br></span></div><div><br></div><div class="gmail_extra"><div class="gmail_quote">On Mon, Feb 22, 2016 at 5:12 PM, Ezra Haber Glenn <span dir="ltr">&lt;<a href="mailto:eglenn@mit.edu" target="_blank">eglenn@mit.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
The package keeps acs-class objects with geographies, estimates, and<br>
standard.errors (not standard deviations -- lookup both to see the<br>
difference).  When printing out such an object, the package<br>
automatically converts the standard error to a 90% margin of error, by<br>
multiplying it by 1.645.  (For other MOEs, you&#39;d need to use a<br>
different multiplier.)<br>
<br>
So for your table, you can use 1.645*standard.error(county_data) to<br>
get the 90% MOEs.<br>
<br>
--Ezra<br>
<div><div class="h5"><br>
At Mon, 22 Feb 2016 17:03:13 -0800, arilamstein wrote:<br>
&gt;<br>
&gt; I am trying to create a data.frame of acs data with 3 columns: region (for example county<br>
&gt; fips), estimate and margin.of.error. I&#39;m starting with this code:<br>
&gt;<br>
&gt; counties = geo.make(state=&quot;*&quot;, county=&quot;*&quot;)<br>
&gt; county_data = acs.fetch(geography=counties, table.number=&quot;B19301&quot;)<br>
&gt; head(county_data)<br>
&gt;<br>
&gt; I can construct the county fips code from county_data@geography<br>
&gt;<br>
&gt; I can construct the estimates from estimate(county_data).<br>
&gt;<br>
&gt; I am not sure how to get the margins of error. If I type &quot;head(county_data)&quot; the estimates<br>
&gt; are printed along with the margins of error. However, there does not seem to be a<br>
&gt; &quot;margin.of.error&quot; function to strip out just the margins of error:<br>
&gt;<br>
&gt; &gt;head(county_data)<br>
&gt; ACS DATA:<br>
&gt;  2007 -- 2011 ;<br>
&gt;   Estimates w/90% confidence intervals;<br>
&gt;   for different intervals, see confint()<br>
&gt;                         B19301_001<br>
&gt; Autauga County, Alabama 25035 +/- 916<br>
&gt; Baldwin County, Alabama 27217 +/- 591<br>
&gt; Barbour County, Alabama 15899 +/- 883<br>
&gt; Bibb County, Alabama    18462 +/- 1267<br>
&gt; Blount County, Alabama  21185 +/- 862<br>
&gt; Bullock County, Alabama 20678 +/- 3797<br>
&gt;<br>
&gt; However, there does seem to be a standard.error function which provides the  standard<br>
&gt; errors:<br>
&gt;<br>
&gt; &gt; head(standard.error(county_data))<br>
&gt;                         B19301_001<br>
&gt; Autauga County, Alabama   556.8389<br>
&gt; Baldwin County, Alabama   359.2705<br>
&gt; Barbour County, Alabama   536.7781<br>
&gt; Bibb County, Alabama      770.2128<br>
&gt; Blount County, Alabama    524.0122<br>
&gt; Bullock County, Alabama  2308.2067<br>
&gt;<br>
&gt; Can someone help me understand this discrepancy?<br>
&gt;<br>
&gt; Also, it would be great if someone could provide guidance about which of these metrics<br>
&gt; (margin of error vs standard deviation) is better to report along with the esimate.<br>
&gt;<br>
&gt; My situation is that I have a mapping package that uses the acs package to get census data<br>
&gt; estimates as a data.frame and then maps it. I would like to improve the package by making<br>
&gt; the data.frames also have an error metric. But I&#39;m confused about whether margin of error<br>
&gt; or standard error is the best metric to include.<br>
&gt;<br>
&gt;<br>
<br>
</div></div>--<br>
Ezra Haber Glenn, AICP<br>
Department of Urban Studies and Planning<br>
Massachusetts Institute of Technology<br>
77 Massachusetts Ave., Room 7-337<br>
Cambridge, MA 02139<br>
<a href="mailto:eglenn@mit.edu">eglenn@mit.edu</a><br>
<a href="http://dusp.mit.edu/faculty/ezra-glenn" rel="noreferrer" target="_blank">http://dusp.mit.edu/faculty/ezra-glenn</a> | <a href="http://eglenn.scripts.mit.edu/citystate/" rel="noreferrer" target="_blank">http://eglenn.scripts.mit.edu/citystate/</a><br>
<a href="tel:617.253.2024" value="+16172532024">617.253.2024</a> (w)<br>
<a href="tel:617.721.7131" value="+16177217131">617.721.7131</a> (c)<br>
</blockquote></div><br></div></div>