Can I build a query expression to calculate confidence intervals on a
set of data? Excel has this function built-in, but I think Access
thanks in advance
...Is there anyway I can transfer the output of my matlab program to the Excel? I need to generate a table from my program's output.
Matlab to Excel
"Amy" wrote in message <firstname.lastname@example.org>...
> Matlab to Excel
% To name a few:
% If those don't help, you need to be more specific.
"someone" wrote in message <email@example.com>...
> "Amy" wrote in message <firstname.lastname@example.org>...
> > Matlab to Excel
> % To name a few:
> doc xlswrite
> doc cvswrite
> doc dlmwrite
> % If those don't help, you need to be more specific.
Thank you... it works exactly what I need.
...matlab output question
I have a matlab question:
Suppose I want to output to a file with the following format:
"190" r2pos "219"
"193" r2pos "220"
"202" r2pos "203"
"205" r2pos "216"
"207" r2pos "226"
"229" r2pos "230"
"236" r2pos "237"
The two columns of numbers are recorded in the variables x and y. I
use fprintf but can not get the " symbol in the file. Does any body
know how to do this?
try this :
fprintf('"%d" r2pos "%d"',x,y)
Thus spake <Jane>:
> I have a matlab question:
> Suppose I want to output to a file with the following format:
> "190" r2pos "219"
> "193" r2pos "220"
> "202" r2pos "203"
> "205" r2pos "216"
> "207" r2pos "226"
> "229" r2pos "230"
> "236" r2pos "237"
> The two columns of numbers are recorded in the variables x and y. I
> use fprintf but can not get the " symbol in the file. Does any body
> know how to do this?
tmpl=['"' '%d' '"' ' r2pos "' '%d' '"\n' ];
A: Because it messes up the ord...confidence interval #7
I need some quick help.I am a sas programmer from IT background.I was
asked be a
pharmaco kinetist in our company to find the confidence intervals and
ratio of least squares mean on Cmx,Tmax,AUC and t1/2-
male vs female and weightas covariate.Can anybody pl help me How can I
your hep is really appreciated.
...RE: SYS$OUTPUT ?
No, the first executable statement is a PUT SKIP; I am using a rather
old version of emacs, 19.22, not that it should matter, but my guess is that
emacs is interpreting the null byte as end of file. I tried this on a
current version of emacs on Linux and no problem. In fact the first two
in the program are
PUT SKIP LIST ('BENCHMARK 1 - TWO AND THREE DIMENSIONAL SLOW
' DOT PRODUCT - VAX PL/I DEC');
so I don't see where the null byte is coming from. Maybe the skip is
the null byte, will have to test that.
HERMES> create null.pli
test: proc options(main);
put skip list('This is a Test');
HERMES> pli null
HERMES> link null
HERMES> run null
This is a Test
I guess that wasn't it.
HERMES> create null.com
$ SET VERIFY
$ define sys$output null.log
$ SHOW TIME
$ run null
$ SET VERIFY
$ define sys$output null.log
HERMES> dump/hex null.log
00454D49 5420574F 48532024 8D01000D ....$ SHOW TIME. 000000
3030322D 4E414A2D 37202020 8D010018 .... 7-JAN-200 000010
20248D01 000C3732 3A33313A 36302034 4 06:13:27....$ 000020
00010002 00010002 6C6C756E 206E7572 run null........ 000030
65542061 20736920 73696854 00010011 ....This is a Te 000040
00000000 00000000 0000FFFF 00207473 st ............. 000050
00000000 00000000 00000000 00000000 ................ 000060
so after the command line there are so...confidence interval for proportions
i have a sample of of 100 subjects, of them, 2 are over 50 years old.
Now i want to construct a 95% confidence interval for the mean of
number of subjects age>50 for the whole population. how can i do this
also,how do i do one-sided C.I. in sas?
one last quesiton, how do i use sas to construct C.I. for the
differences of two means of two different population (each with a
different sample size )
Thanks a lot!!
...complex output from matlab IFFT
Why am i getting complex output when i compute the inverse fft of a
vector of complex numbers? This does not happen always and the
imaginary part of the output is very small compared to the real part.
thanks for any insight
ok this is really dumb...i will reply to myself!
rounding errors contribute to this, should take real(ifft(s)) or
abs(ifft(s)), i think there is not much difference since imaginary
parts are really small.
> ok this is really dumb...i will reply to myself!
Don't worry, I sometimes do that as well. Often just asking the
question out loud is enough to find the answer.
> rounding errors contribute to this, should take real(ifft(s)) or
> abs(ifft(s)), i think there is not much difference since imaginary
> parts are really small.
In your original post, you wrote that the IFFT of a complex vector gave
you a complex vector. In general, that is perfectly valid. You can only
expect a real-valued output if the frequency domain vector has
Hermitian symmetry. In that case, just discard the imaginary IFFT
output - don't take the absolute of the IFFT, as the real output could
become negative (you'd lose that information in the abs() routine).
10x for highlighting the difference bweteeen the real() and abs(). As
for the Hermitian symmetry property, i never heard of this, if you
could elaborate more or point out some links, would be gratefull.
<...Re: Confidence Interval #27
as far as I understand the documentation, the confidence level is set by
the option alpha=
proc reg data=USPopulation outest=est tableout alpha=0.1;
should set the confidence-level to 90%, alpha=0.05 to 95%, alpha=0.01 to
On Mon, 2 Mar 2009 10:34:49 -0500, Abhay Kaushik
>I have a sample of 350 companies. When we run a simple OLS we get t and p
>values of the intercept and beta coefficients. Is there any way, I can get
>output showing which company’s intercept coefficient is significant at
>90%, 95%, and 99% confidence intervals.
>P.S. My model is:
>Proc reg data=test;
>model y = X1 X2 X3 X4;
...Re: confidence interval for proportions
> -----Original Message-----
> From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On
> Behalf Of Ben
> Sent: Monday, December 15, 2008 3:15 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: confidence interval for proportions
> i have a sample of of 100 subjects, of them, 2 are over 50 years old.
> Now i want to construct a 95% confidence interval for the mean of
> number of subjects age>50 for the whole population. how can i do this
> in sas?
> also,how do i do one-sided C.I. in sas?
> one last quesiton, how do i use sas to construct C.I. for the
> differences of two means of two different population (each with a
> different sample size )
> Thanks a lot!!
First, do you have SAS/Stat licensed? If so there are a variety of
procedures already written to calculate what you want. No need to recreate
Now your three questions.
1. There is no universally accepted method for calculating a confidence
interval independent of context. Is your population small enough that you
need to worry about using a finite population correction? Do you want to
use a large sample normal approximation, or "exact" methods? Is this data
from a survey sample?
2. A one-sided confidence interval (if you really do want one) is calculated
pretty much the same way a two-sided interval is calculated.
3. This is easily calculated by a variety SAS procedures.
So, write back to SAS-L and let us know if you have acce...Re: confidence interval #15
There was a nice article
Agresti & Coull (1998) Approximate is better than "exact" for interval
estimation of binomial proportions. American Statistician, 52, 119-126.
I had written a SAS macro to do this; it got destroyed on Sept
11......BUT SAS-L is archived and I found it.....
* A macro to implement binomial confidence intervals as per Agresti &
options nosymbolgen nomlogic nomprint;
%macro binom(s, N, pval);
/* s is number of successes, N is number of trials, p is probability
z = abs(probit(&pval/2));
z2 = z**2;
p = &s/&n;
q = 1 - p;
waldest = p;
walducl = waldest + z*((p*q/&n)**.5);
waldlcl = waldest - z*((p*q/&n)**.5);
adjs = &s + 2;
adjn = &n + 4;
adjp = adjs/adjn;
adjq = 1 - adjp;
awaldest = (&s + 2)/(&n +4);
awalducl = awaldest + z*((adjp*adjq/adjn)**.5);
awaldlcl = awaldest - z*((adjp*adjq/adjn)**.5);
nz2 = &n + z2;
scoreci = z*(1/nz2*(p*q*(&n/nz2) + .5 * .5 * z2/nz2))**.5;
scoreest = p*&n/nz2 + z2/(2*nz2);
scorelcl = scoreest - scoreci;
scoreucl = scoreest + scoreci;
waldest = 'Pt. est. using traditional (Wald) method'
waldlcl = 'Lower bound of Wald CI'
walducl = 'Upper bound of Wald CI'
awaldest = 'Pt. est. using adjusted Wald method'
awaldlcl = 'Lower bound of adjusted Wald CI'
awalducl = 'Upper bound of adjusted Wald CI';
proc p...Re: Confidence Interval #26
>I have two treatment groups for which I need to derive 95% confidence
>Interval for a lab test. Could anyone tell me how I can do that?
In addition to all the other well-stated questions which you NEED to
answer, let me ask more.
Are the treatment groups independent, or do you have something
like before-and-after pairings or two-treatments-on-the-same sample
Do you have clusters of data, such as blocks of sample points run with
particular QA samples?
Where do the samples come from, and why do you want to perform
this type of analysis?
We're not asking all these questions to be mean. No, we can be mean
in lots of other ways. :-) We need these answers in order to decide
what are appropriate statistical methods for your process.
David L. Cassell
3115 NW Norwood Pl.
Corvallis OR 97330
PC Magazine�s 2007 editors� choice for best Web mail�award-winning Windows
I am using the System Exec.vi to send a command line to the windows command prompt:
"command.com /c w32tm.exe /resync"
I use this to force my PC to update the system time with a time server. When I run this command in the command prompt outside labview I get an output when the process completes that says "The command completed successfully.".
I want to be able to display this message in LabVIEW - however when I wire a string indicator to the "standard output" terminal of the VI I don't get any feedback. Is this possible using this method? Or am I better off reading the return code to establish if the task completed? Return code doesn't seem to do anything either. It would be nice to know whether the process worked or not.
<a href="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/time_w32tm.mspx?mfr=true" target="_blank">http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/time_w32tm.mspx?mfr=true</a> Message Edited by russelldav on 11-26-2007 02:51 PM
I just worked out how to fix this and get the output I wanted...
I changed the command line to:
and it works fine. I'm hazarding a guess the /c before was causing the problem?
Does anyone know wh...Soft Output Sphere Decoder
Has anybody encountered use of norms (L1, Linf) instead of L2, i
implementing soft output sphere decoder (SD)? I know that it has been use
in implementing hard output. you help will be greatly appreciated.
Do you know a company who employs DSP engineers?
Is it already listed at http://dsprelated.com/employers.php ?
On Jun 4, 8:18 am, "pankajb" <mahajanpan...@yahoo.com> wrote:
> Has anybody encountered use of norms (L1, Linf) instead of L2, in
> implementing soft output sphere decoder (SD)? I know that it has been used
> in implementing hard output. you help will be greatly appreciated.
> Do you know a company who employs DSP engineers?
> Is it already listed athttp://dsprelated.com/employers.php?
L1 is not a bad approximation of L2 in some (small angle) regime,
so this is often used in fixed-point implementation if one wants
to avoid the use of multipliers.
Linf is also not a bad approximation of L2 depending on the
signal-to-noise ratio, and the input distribution.
>On Jun 4, 8:18 am, "pankajb" <mahajanpan...@yahoo.com> wrote:
>> Has anybody encountered use of norms (L1, Linf) instead of L2, in
>> implementing soft output sphere decoder (SD)? I know that it has bee
>> in implementing hard output. you help will be greatly appreciated.
>&g...Date intervals with an output example
>An example output would be really helpful, as there is ample room for
misinterpretation of your spec - or maybe that's just me.
Thanks for the request for output clarification, here is a sample of the
output I have been asked to provide. These two records meet criteria of
having two values of tdate, more than 12 days apart.
pid score tdate
223 9922 19JUN2008
448 2522 22JUN2008
Thanks for the opportunity to clarify my question,
Below is some sample data and here is my current question: I am trying
to obtain every pid where the second value of tdate is 12 or more days
past the first value of tdate for that same pid. I have tried using the
retain option and I am experimenting with intck or intnx, no luck so
far. I think I should use FIRST.pid then refer to that value's tdate but
from there on I am not sure what to do next.
input pid :$10. score :$5. tdate :date9.;
format tdate date9.;
011 330 11Jul2008
0222 2229 12Aug2008
011 3305 09Jul2008
0399 2244 17Aug2008
011 8892 30Jul2008
0221 3306 09Jul2008
0221 339 10Jul2008
448 2522 22Jun2008
0221 338 25Jul2008
011 330 08Jul2008
0222 022 08Jul2008
0222 2555 09Jul2008
223 3388 14Oct2008
488 2239 01Jun2008
011 2599 04Aug2008
0399 3392 12Aug2008
011 338 23Jul2008
0399 3383 03Sep2008
0399 882 01Aug2008
223 3389 01Jun2008
223 9922 19Jun2008
448 2501 03May2008
proc sort data=3Ddates out=3Ddates1;
by pid tdate;
Diane K. Smith
Dat...sas code confidence interval
I want to know how to compute confidence intervalle in sas:
My data is :
G1 N=559 G2 N=251
Category n % n %
D 0 0.0 1 0.0
L 13 2.3 5 2.0
I look for a sas code thanks
...Re: Confidence interval #17 1550831
J S Huang
>>> Miguel de la Hoz <miguel_hoz@YAHOO.ES> 1/16/2006 11:28:19 AM >>>
Just an easy question about inference. I have the following information
p=estimation of an event
n=observations in a sample
z=value for the 95% confidence
When my book says that the confidence interval is
the n value is the sample or population size???
Many thanks in advance.
All my best
LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y m�viles desde 1 c�ntimo por minuto.
...Re: How to get Confidence intervals in my data
On Thu, 9 Apr 2009 13:29:57 -0700, Nancy Li <nancy_li66@YAHOO.COM> wrote:
>I have a very simple data set with three columns, provider ID, MRI counts
>per 100 episde, and average MRI counts per 100 episode. There are total
>500 providers, the average MRI# is based on the 500 providers. I wonder
>whehter there is a way to get the providers 95% confidence interval
>around the average MRI/100 episode? If so, how can I get there using SAS?
>Which method and procedure should I use? Any suggestions would be very
The CI depends on the distribution. For normally distributed data, you
could use the CLM options to the MEANS statement in the MEANS procedure:
Proc Means Data = yourdata N Mean STD CLM ;
var MRI ;
Counts or rates might have a poisson distribution, but with a large
enough rate/sample size, you can use a normal approxitmation. If you
suspect another distribution might be more suitable, please write back to
the list for additional help.
The details of the CLM calculation can be found in the online docs for
the MEANS procedure.
From the brief data you showed, which might be arranged by ascending
rates, the values seem far lower than the mean. Just a note.
...Comparing parameters with overlapping confidence intervals
Ok so I'm fitting a non-linear model to two sets of data and I want to
compare the resulting estimated parameters (from fit#1 and fit#2).
For each parameter, I'm able to compute non-linear confidence
intervals (not asymptotic ones).
Therefore I have something like (nominal value and confidence
intervals in brackets):
Para1 (in fit#1): 12 [8 - 15]
Para1 (in fit#2): 7 [5 - 10]
Notice that the confidence intervals are not symetrical.
Anyway the question is: How can I statistically assess whether the two
parameters are the same or not ?
From what I understand:
Non-overlapping Conf.Int. can tell you right away that the two
estimates differ, but conversely, overlapping conf. int. do not
NECESSARILY imply that they are not statistically different.
...Re: Date intervals with an output example
On Mon, 24 Nov 2008 12:27:31 -0600, Smith, Diane K
>>An example output would be really helpful, as there is ample room for
>misinterpretation of your spec - or maybe that's just me.
>Thanks for the request for output clarification, here is a sample of the
>output I have been asked to provide. These two records meet criteria of
>having two values of tdate, more than 12 days apart.
>pid score tdate
>223 9922 19JUN2008
>448 2522 22JUN2008
>Thanks for the opportunity to clarify my question,
proc sort data=dates out=sorted;
by pid tdate;
if lag(first.pid) and not first.pid and dif(tdate) > 11;
>Below is some sample data and here is my current question: I am trying
>to obtain every pid where the second value of tdate is 12 or more days
>past the first value of tdate for that same pid. I have tried using the
>retain option and I am experimenting with intck or intnx, no luck so
>far. I think I should use FIRST.pid then refer to that value's tdate but
>from there on I am not sure what to do next.
>input pid :$10. score :$5. tdate :date9.;
>format tdate date9.;
>011 330 11Jul2008
>0222 2229 12Aug2008
>011 3305 09Jul2008
>0399 2244 17Aug2008
>011 8892 30Jul20...Confidence interval for failure test data
Say you have a mechanical device that must withstand 20 lbs of pressure.
You test 10 of these devices with a machine that is able to deliver up to
400 lbs of pressure. None of the 10 devices fails. The final recorded
pressure measurements for these 10 devices are close (but not exactly equal)
to 400, with some variability but with a very small standard deviation. You
think you need a confidence interval for the pressure at which the devices
This question was posed to me by a fellow shuttle passenger on the way home
from the airport. To an ecologist, I probably would say, "Wow, who needs
statistics on data like that?!" But this is a medical device so
expectations might well be different. I told him I'd ask around.
My questions are:
Even in a regulatory environment, is there any point in computing a
confidence interval on data of this nature? If so, how might this
confidence interval be computed?
Is another form of assessment appropriate in this context (e.g., some
probability of failure)?
I had one QC/reliability course many, many years ago and am essentially
clueless on this topic, so any suggestions would be welcomed.
Thanks in advance,
Utah State University
...95% Confidence Interval for rate=0
We are doing a decease trasfusion transmission study and found for total 34
patients, no one is infeced. So the infection rate is 0. Right now, I need
to calcluate the 95% CIs for the infection rate. Can any expert let me know
how to calculate it because it is not a normal distribution? Your advice is
...Re: Kappa confidence intervals #2
>We are currently upgrading from SAS 8 to version 9. When re-running
>old programs under version 9 we noticed the following: The upper limit
>the confidence interval for the kappa statistic (calculated using Proc
>FREQ) is now always bounded at 1. Previously under version 8 we had
>cases where the upper limit was slightly above 1 (say 1.0386).
>I looked up "What's New in SAS 9.x" on the SAS Institutes web page but
>couldn't find anything that would explain this.
>Does anyone know anything more about this?
>>> David L Cassell <davidlcassell@MSN.COM> 10/06/06 4:25 PM >>> replied
This looks like a minor bug fix to me. Under perfect agreement, kappa
can get up to 1, but cannot go over 1. So it does not make sense for
the confidence interval to exceed one, regardless. The minimum value
of kappa will be somewhere between -1 and 0, depending on the
marginal proportions. But the maximum will not be over 1.
Looks that way to me, too. But I wonder if anyone knows if the new CIs
are based on anything more than
just cutting off the old ones at 1? I haven't got access to the online
doc from this computer (and the OP found nothign) but this looks like an
area where some sort of simulation would be useful.
...Re: Confidence Interval #19 1553203
SUBSCRIBE SAS-L Anonymous ,
Try the following:
data = calc CLM alpha = 0.05 ;
var perc ;
output out = cintv clm(Perc) = PerkClm ;
Should put the confidense interval in the output data set with a name of
From: SUBSCRIBE SAS-L Anonymous <sas_use@YAHOO.COM>
Reply-To: SUBSCRIBE SAS-L Anonymous <sas_use@YAHOO.COM>
Subject: Confidence Interval
Date: Mon, 1 May 2006 09:59:36 -0400
I have to calculate the Confidence Interval and i m not sure what am i
doing wrong coz when i put it in PROC MEANS i get nothing.
I have to compute the CI for just a number. This number is a the
percentage of people who took the test out of all the students.
So say i have
Now i have to calculate its Confidence interval.
I was doing
proc means data=calc CLM alpha=0.05;
But this doesn't give me the CI.
Can someone plz help me out.
Thanks in advance.
...Re: Confidence Interval #23 1553214
Sorry about that it should have been:
data = calc CLM alpha = 0.05 ;
var perc ;
output out = cintv Uclm(Perc) = UpperCL
Lclm(Perc) = LowerCL ;
From: SUBSCRIBE SAS-L Anonymous <sas_use@YAHOO.COM>
Reply-To: SUBSCRIBE SAS-L Anonymous <sas_use@YAHOO.COM>
Subject: Re: Confidence Interval
Date: Mon, 1 May 2006 10:41:03 -0400
Thanks for helping me out.
WHen i run this code it gives me an error. It doesn't recognize clm in the
third line. I m using 8.2 version...cud that be the problem?
This is the message i got.
NOTE: SCL source line.
2340 output out=cintv clm (Perc)=PerkClm;
ERROR 22-322: Syntax error, expecting one of the following: ;, (, /, CSS,
CV, IDGROUP, IDGRP, KURTOSIS, LCLM, MAX, MAXID,
MEAN, MEDIAN, MIN, MINID, N, NMISS, OUT, P1, P10, P25, P5,
P50, P75, P90, P95, P99, PROBT, Q1, Q3, QRANGE,
RANGE, SKEWNESS, STDDEV, STDERR, SUM, SUMWGT, T, UCLM, USS,
ERROR 76-322: Syntax error, statement will be ignored.
On Mon, 1 May 2006 14:15:50 +0000, toby dunn <tobydunn@HOTMAIL.COM> wrote:
>Try the following:
> data = calc CLM alpha = 0.05 ;
> var perc ;
> output out = cintv clm(Perc) = PerkClm ;
>Should put the confidense inter...