tag:blogger.com,1999:blog-535955433685226359.post4594577295072048747..comments2024-02-25T08:38:48.400+00:00Comments on Ian Walker’s blog: Area under two curves in [R]Ian Walkerhttp://www.blogger.com/profile/04238484638393249191noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-535955433685226359.post-8111834010832099802010-06-15T21:38:44.782+01:002010-06-15T21:38:44.782+01:00Okay, this COULD be wrong, as it's just off th...Okay, this COULD be wrong, as it's just off the top of my head, but you can do:<br /><br />sum(y1)<br /><br />to get the area under one curve (in arbitrary units), and sum(y2) to get the area under the other (they should be approximately equal, with any differences due to rounding errors etc.). You can also use<br /><br />sum(common) <br /><br />to get the shared area. So if you do<br /><br />sum(common) / sum(y1) <br /><br />you'll get the size of the common area in standardized units (i.e., as a proportion of each original curve). I think. Hope that helps.Ian Walkerhttps://www.blogger.com/profile/04238484638393249191noreply@blogger.comtag:blogger.com,1999:blog-535955433685226359.post-85662185441834034502010-06-15T21:29:29.647+01:002010-06-15T21:29:29.647+01:00Thanks! That was really useful. Also, if I want to...Thanks! That was really useful. Also, if I want to find the area of the region shared, how would I go about doing that?Anonymoushttps://www.blogger.com/profile/09519776311283882067noreply@blogger.comtag:blogger.com,1999:blog-535955433685226359.post-79084094389694085382010-03-11T20:54:19.436+00:002010-03-11T20:54:19.436+00:00just what i was looking for... Thanks a lot :)just what i was looking for... Thanks a lot :)kanchhttps://www.blogger.com/profile/01755985704956095725noreply@blogger.comtag:blogger.com,1999:blog-535955433685226359.post-50848534764469156102009-06-02T14:01:11.310+01:002009-06-02T14:01:11.310+01:00Useful to me as well
merci!Useful to me as well<br /><br />merci!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-535955433685226359.post-15003475332530073882009-04-18T10:48:00.000+01:002009-04-18T10:48:00.000+01:00I'm really pleased someone found this useful!I'm really pleased someone found this useful!Ian Walkerhttps://www.blogger.com/profile/05112106400618895523noreply@blogger.comtag:blogger.com,1999:blog-535955433685226359.post-43358078786051540132009-04-17T17:15:00.000+01:002009-04-17T17:15:00.000+01:00It was in fact really obvious... after I read it h...It was in fact really obvious... after I read it here! Thanks!<br /><br />niconicohttp://www.nicolaromano.netnoreply@blogger.com