<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>Debasish</div>
<div><br>
</div>
<div>This is a stats issue, not an issue with NCL.</div>
<div><br>
</div>
<div>Your x points span zero; at x = 0, then yReg, yReg_1 and yReg_2 ALL equal rc@yintercept. The intersecting cones of uncertainty that you see in your plot are a correct representation of the uncertainty in rc. If you don't want them to intersect then you
will need to include the uncertainty in your second estimated parameter, i.e. intercept.</div>
<div><br>
</div>
<div>Will</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>debasish mazumder <<a href="mailto:debasish@ucar.edu">debasish@ucar.edu</a>><br>
<span style="font-weight:bold">Date: </span>Wednesday, 6 May 2015 3:57 AM<br>
<span style="font-weight:bold">To: </span>"<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>" <<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>><br>
<span style="font-weight:bold">Subject: </span>[ncl-talk] confidence interval on a regression line<br>
</div>
<div><br>
</div>
<div>
<div bgcolor="#FFFFFF" text="#000000">Hi All,<br>
<br>
I am trying to plot confidence interval on a regression line (like attached image)<br>
<br>
I have x and y two variables.<br>
<br>
x varies between -0.07 and 0.06<br>
y varies between -0.8 and 0.5 <br>
<br>
I followed following steps: <br>
<br>
step 1: rc = regline (x,y)<br>
<br>
step 2: yReg = rc*x + rc@yintercept ; regression line<br>
<br>
step 3: <i>a = rc@rstd</i> * 2.048 ; where <i>t</i> for 0.975 and 28 degrees of freedom is 2.048 [table look-up].<br>
<br>
step 4: confidence interval rc1 = rc+a and rc2 = rc-a<br>
<br>
step 5: confidence interval around regression line <br>
yReg_1 = rc1*x + rc@yintercept<br>
yReg_2 = rc2*x + rc@yintercept<br>
<br>
But I am not getting the expected plot. Moreover yReg_1 and yReg_2 intersect each other.<br>
Could you please point out what I am doing wrong.<br>
<br>
with regards<br>
-Debasish<br>
<br>
<br>
<br>
<br>
<br>
</div>
</div>
</span>
<p style="font-size:10pt; line-height:10pt; calibri"><br>
<br>
University of Tasmania Electronic Communications Policy (December, 2014). <br>
This email is confidential, and is for the intended recipient only. Access, disclosure, copying, distribution, or reliance on any of it by anyone outside the intended recipient organisation is prohibited and may be a criminal offence. Please delete if obtained
in error and email confirmation to the sender. The views expressed in this email are not necessarily the views of the University of Tasmania, unless clearly intended otherwise.
</p>
</body>
</html>