From: Joseph Mingrone <jrm@ftfl.ca>
To: Glenn Morris <rgm@gnu.org>
Subject: bug#15414: 24.3; piping problems in eshell
Date: Sat, 21 Sep 2013 20:41:58 -0300 [thread overview]
Message-ID: <86d2o1g2t5.fsf@gly.ath.cx> (raw)
In-Reply-To: <6hzjr891ve.fsf@fencepost.gnu.org> (Glenn Morris's message of "Thu, 19 Sep 2013 13:07:17 -0400")
Glenn Morris <rgm@gnu.org> writes:
> Maybe pipe cat to cat -v -n, and see what goes missing / gets added?
% cat test.in | cat -v > test.out
% diff test.in test.out
The diff shows that test.out gets truncated after 1984 characters
(that's what wc -m test.out reports).
The contents of test.in, test.out and the diff follow.
Joseph
---------------------- test.in ----------------------
// Stat2080 Assignment 8 Winter 2012/2013
// Question 2a
/LET itX = mathBeg_m+"X"+mathEnd_m
/LET itY = mathBeg_m+"Y"+mathEnd_m
/LET itSSxx = mathBeg_m+"SS"+mathEnd_m+subBeg_m+"xx"+subEnd_m
/LET itSSyy = mathBeg_m+"SS"+mathEnd_m+subBeg_m+"yy"+subEnd_m
/LET itSSxy = mathBeg_m+"SS"+mathEnd_m+subBeg_m+"xy"+subEnd_m
/LET itH0 = mathBeg_m+"H"+mathEnd_m+subBeg_m+"0"+subEnd_m
/LET itHa = mathBeg_m+"H"+mathEnd_m+subBeg_m+"a"+subEnd_m
/LET itF = mathBeg_m+"F"+mathEnd_m
/LET n = 10
/LET xm = 5.
/LET ym = 12.
/LET SSxy = 121.+random(1,8)
/LET SSxx = 136.+random(1,8)
/LET SSyy = 155.
/LET b1 = SSxy/SSxx // beta1_hat
/LET b0 = ym-b1*xm // bet0_hat
/LET b1 = roundto(b1,2)
/LET b0 = roundto(b0,2)
/LET dft = n-1
/LET dfr = 1
/LET dfe = dft-dfr
/LET SSR = SSxy*SSxy/SSxx
/LET SST = SSyy
/LET SSE = SST-SSR
/LET MSR = SSR/dfr
/LET MSE = SSE/dfe
/LET R2 = SSR/SST
/LET SEb1= sqrt(MSE/SSxx)
A straight line is fitted to some data using least squares and the following summary statistics:/DIS(newLine_m)
/DIS(n_gw+eq_m)/DIS(n),/DIS(hSpace1_m) /DIS(xbar_gw+eq_m)/DIS(xm:0f),/DIS(hSpace1_m) /DIS(ybar_gw+eq_m)/DIS(ym:0f),/DIS(hSpace1_m)
/DIS(itSSxy+eq_m)/DIS(SSxy:0f), /DIS(newLine_m) /DIS(itSSxx+eq_m)/DIS(SSxx:0f),/DIS(hSpace1_m) /DIS(itSSyy+eq_m)/DIS(SSyy:0f)./DIS(newLine_m)
The least squares intercept and slope are /DIS(b0:2f) and /DIS(b1:2f), respectively, and the ANOVA table is
/DIS(vSpace10_m)
/DIS(web("","\begin{tabular}{|l|c|c|c|} \hline","<table border='1' cellpadding='4'><tr><th>")) \
Source /DIS(seph_m) DF /DIS(seph_m) SS /DIS(seph_m) MS
/DIS(nllh_m)
/DIS(web("","","<tr align='center'><td>")) \
Regression /DIS(sep_m) /DIS(dfr) /DIS(sep_m) /DIS(SSR:2f) /DIS(sep_m) /DIS(MSR:2f) /DIS(nll_m)
/DIS(web("","","<tr align='center'><td>")) \
Residual /DIS(sep_m) /DIS(dfe) /DIS(sep_m) /DIS(SSE:2f) /DIS(sep_m) /DIS(MSE:2f) /DIS(nll_m)
/DIS(web("","","<tr align='center'><td>")) \
Total /DIS(sep_m) /DIS(dft) /DIS(sep_m) /DIS(SST:2f)/DIS(sep_m)/DIS(nbsp_m) /DIS(nll_m)
/DIS(web("","\end{tabular}","</table>"))
/DIS(vSpace10_m)
/LET xstar = random(7,10)
/LET yhat = b0+b1*xstar
/IMP "/dalphysicslib/Tools/Problem"
What is the estimated mean value for /DIS(y_gw) when /DIS(x_gw+eq_m)/DIS(xstar)?
/ANS(yhat:2f, tol=0.03, wgt=wgt_v, tries=tries_v)
/LET yhat = random(18,22)
/LET xstar = (yhat-b0)/b1
/IMP "/dalphysicslib/Tools/Problem"
If the fitted value for /DIS(y_gw) is /DIS(yhat), what is the corresponding value for /DIS(x_gw)?
/ANS(xstar:2f, tol=0.03, wgt=wgt_v, tries=tries_v)
/LET percent = R2*100
/IMP "/dalphysicslib/Tools/Problem"
What percent of the variation in /DIS(y_gw) is explained by the regression in /DIS(x_gw)? Enter an integer, without the /DIS(pct_u) sign.
/ANS(percent:0f, tol=0.6, wgt=wgt_v, tries=tries_v)
/IMP "/dalphysicslib/Tools/Problem"
What is the standard error of the slope estimate? Enter 3 decimals.
/ANS(SEb1:3f, tol=0.01, wgt=wgt_v, tries=tries_v)
---------------------- test.out ----------------------
// Stat2080 Assignment 8 Winter 2012/2013
// Question 2a
/LET itX = mathBeg_m+"X"+mathEnd_m
/LET itY = mathBeg_m+"Y"+mathEnd_m
/LET itSSxx = mathBeg_m+"SS"+mathEnd_m+subBeg_m+"xx"+subEnd_m
/LET itSSyy = mathBeg_m+"SS"+mathEnd_m+subBeg_m+"yy"+subEnd_m
/LET itSSxy = mathBeg_m+"SS"+mathEnd_m+subBeg_m+"xy"+subEnd_m
/LET itH0 = mathBeg_m+"H"+mathEnd_m+subBeg_m+"0"+subEnd_m
/LET itHa = mathBeg_m+"H"+mathEnd_m+subBeg_m+"a"+subEnd_m
/LET itF = mathBeg_m+"F"+mathEnd_m
/LET n = 10
/LET xm = 5.
/LET ym = 12.
/LET SSxy = 121.+random(1,8)
/LET SSxx = 136.+random(1,8)
/LET SSyy = 155.
/LET b1 = SSxy/SSxx // beta1_hat
/LET b0 = ym-b1*xm // bet0_hat
/LET b1 = roundto(b1,2)
/LET b0 = roundto(b0,2)
/LET dft = n-1
/LET dfr = 1
/LET dfe = dft-dfr
/LET SSR = SSxy*SSxy/SSxx
/LET SST = SSyy
/LET SSE = SST-SSR
/LET MSR = SSR/dfr
/LET MSE = SSE/dfe
/LET R2 = SSR/SST
/LET SEb1= sqrt(MSE/SSxx)
A straight line is fitted to some data using least squares and the following summary statistics:/DIS(newLine_m)
/DIS(n_gw+eq_m)/DIS(n),/DIS(hSpace1_m) /DIS(xbar_gw+eq_m)/DIS(xm:0f),/DIS(hSpace1_m) /DIS(ybar_gw+eq_m)/DIS(ym:0f),/DIS(hSpace1_m)
/DIS(itSSxy+eq_m)/DIS(SSxy:0f), /DIS(newLine_m) /DIS(itSSxx+eq_m)/DIS(SSxx:0f),/DIS(hSpace1_m) /DIS(itSSyy+eq_m)/DIS(SSyy:0f)./DIS(newLine_m)
The least squares intercept and slope are /DIS(b0:2f) and /DIS(b1:2f), respectively, and the ANOVA table is
/DIS(vSpace10_m)
/DIS(web("","\begin{tabular}{|l|c|c|c|} \hline","<table border='1' cellpadding='4'><tr><th>")) \
Source /DIS(seph_m) DF /DIS(seph_m) SS /DIS(seph_m) MS
/DIS(nllh_m)
/DIS(web("","","<tr align='center'><td>")) \
Regression /DIS(sep_m) /DIS(dfr) /DIS(sep_m) /DIS(SSR:2f) /DIS(sep_m) /DIS(MSR:2f) /DIS(nll_m)
/DIS(web("","","<tr align='center'><td>")) \
Residual /DIS(sep_m) /DIS(dfe) /DIS(sep_m) /DIS(SSE:2f) /DIS(sep_m) /DIS(MSE:2f) /DIS(nll_m)
/DIS(web("","","<tr align='center'><td>")) \
Total /DIS(sep_m) /DIS(dft) /DIS(sep_m) /DIS(SST:2f)/DIS(sep_m)/DIS(nbsp_m) /DIS(nll_m)
/DIS(we
---------------------- diff output ----------------------
diff -c /home/jrm/test.in /home/jrm/test.out
*** /home/jrm/test.in 2013-09-21 20:31:23.000000000 -0300
--- /home/jrm/test.out 2013-09-21 20:32:06.000000000 -0300
***************
*** 47,79 ****
Residual /DIS(sep_m) /DIS(dfe) /DIS(sep_m) /DIS(SSE:2f) /DIS(sep_m) /DIS(MSE:2f) /DIS(nll_m)
/DIS(web("","","<tr align='center'><td>")) \
Total /DIS(sep_m) /DIS(dft) /DIS(sep_m) /DIS(SST:2f)/DIS(sep_m)/DIS(nbsp_m) /DIS(nll_m)
! /DIS(web("","\end{tabular}","</table>"))
! /DIS(vSpace10_m)
!
! /LET xstar = random(7,10)
! /LET yhat = b0+b1*xstar
!
! /IMP "/dalphysicslib/Tools/Problem"
! What is the estimated mean value for /DIS(y_gw) when /DIS(x_gw+eq_m)/DIS(xstar)?
!
! /ANS(yhat:2f, tol=0.03, wgt=wgt_v, tries=tries_v)
!
! /LET yhat = random(18,22)
! /LET xstar = (yhat-b0)/b1
!
! /IMP "/dalphysicslib/Tools/Problem"
! If the fitted value for /DIS(y_gw) is /DIS(yhat), what is the corresponding value for /DIS(x_gw)?
!
! /ANS(xstar:2f, tol=0.03, wgt=wgt_v, tries=tries_v)
!
! /LET percent = R2*100
!
! /IMP "/dalphysicslib/Tools/Problem"
! What percent of the variation in /DIS(y_gw) is explained by the regression in /DIS(x_gw)? Enter an integer, without the /DIS(pct_u) sign.
!
! /ANS(percent:0f, tol=0.6, wgt=wgt_v, tries=tries_v)
!
! /IMP "/dalphysicslib/Tools/Problem"
! What is the standard error of the slope estimate? Enter 3 decimals.
!
! /ANS(SEb1:3f, tol=0.01, wgt=wgt_v, tries=tries_v)
--- 47,50 ----
Residual /DIS(sep_m) /DIS(dfe) /DIS(sep_m) /DIS(SSE:2f) /DIS(sep_m) /DIS(MSE:2f) /DIS(nll_m)
/DIS(web("","","<tr align='center'><td>")) \
Total /DIS(sep_m) /DIS(dft) /DIS(sep_m) /DIS(SST:2f)/DIS(sep_m)/DIS(nbsp_m) /DIS(nll_m)
! /DIS(we
\ No newline at end of file
Diff finished. Sat Sep 21 20:38:34 2013
prev parent reply other threads:[~2013-09-21 23:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-19 1:47 bug#15414: 24.3; piping problems in eshell Joseph Mingrone
2013-09-19 2:59 ` Glenn Morris
2013-09-19 15:04 ` Joseph Mingrone
2013-09-19 17:07 ` Glenn Morris
2013-09-21 23:41 ` Joseph Mingrone [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86d2o1g2t5.fsf@gly.ath.cx \
--to=jrm@ftfl.ca \
--cc=rgm@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.