Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

- JMP User Community
- :
- Discussions
- :
- 95% confidence intervals

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

95% confidence intervals

Nov 19, 2019 9:04 PM
(958 views)

Hi All,

l am trying to get a summary from a data table, l would like the mean of a variable l10t, the standard error, and 95% confidence interval. It all seemed fairly straight forward, but am having trouble with the 95% confidence intervals, have tried different ways to no avail, currently have

```
dt2<< Summary(
Group( :Sample ),
Mean( :dilution factor, :l10t ),
Freq( "None" ),
Weight( "None" ),
Output Table( "log10t" ),
Std Err( :l10t ),
Confidence Interval( :l10t, 0.95),
Link to original data table(0)
```

l am obviously doing something incorrectly, can anyone offer some advice.

Thanks Heaps

4 REPLIES 4

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: 95% confidence intervals

You can accomplish something similar like this:

```
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
platform = dt << Oneway(
Y( :height ),
X( :sex ),
Means and Std Dev( 1 ),
Box Plots( 1 ),
Mean Diamonds( 1 ),
Mean Error Bars( 1 ),
Std Dev Lines( 1 ),
Connect Means( 1 ),
Points Jittered( 1 ),
Grand Mean( 0 )
);
Wait( 0 );
Report( platform )[Outline Box( "Oneway Analysis of height By sex" )][
Outline Box( "Means and Std Deviations" )][Table Box( 1 )] << Make Into Data Table;
Report( platform ) << Close Window;
```

Place your group variable in the X() role.

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: 95% confidence intervals

Hi mzwald,

Thanks very much for your help and your suggestion, i tried this code

```
platform = dt2 << Oneway(
Y( :l10t ),
X( :fold dilution ),
Means and Std Dev( 1 ),
Box Plots( 1 ),
Mean Diamonds( 1 ),
Mean Error Bars( 1 ),
Std Dev Lines( 1 ),
Connect Means( 1 ),
Points Jittered( 1 ),
Grand Mean( 0 )
);
Wait( 0 );
Report( platform )[Outline Box( "Oneway Analysis of height By sex" )][
Outline Box( "Means and Std Deviations" )][Table Box( 1 )] << Make Into Data Table;
Report( platform ) << Close Window;
```

and received the following error message

`Cannot subscript Display Box in access or evaluation of 'Report(platform)[Outline Box("Oneway Analysis of height By sex")]' , Report( platform )[/*###*/Outline Box( "Oneway Analysis of height By sex" )]`

however, l am almost there as to what i want to achieve for my data table with this,

```
dt2<< Summary(
Group( :Sample ),
Mean( :dilution factor, :l10t ),
Freq( "None" ),
Weight( "None" ),
Output Table( "log10t" ),
Std Err( :l10t ),
Confidence Interval( :Name ("Mean(l10t)")),
Link to original data table(0)
);
Loq = Data Table( "log10t" );
Loq << New Column( "Back T'sform Mean", Numeric, Continuous, Formula( Round(10^:Name ("Mean(l10t)"),0)));
Loq << New Column( "Back T'sform Std error", Numeric, Continuous, Formula(10^:Name ("Std Err(l10t)"), Format( "fixed dec", 6, 0 ) ) );
```

giving me this,

so l am almost there, l was hoping the confidence intervals would be a single simple line of code.

Thanks

Mickyboy

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: 95% confidence intervals

Created:
Nov 21, 2019 1:03 PM
| Last Modified: Nov 22, 2019 11:22 AM
(894 views)
| Posted in reply to message from Mickyboy 11-20-2019

Well it looks like Summary doesn't currently support CI's, but you can always make a formula for them yourself.

The formulas for a 95% confidence interval (assuming a normal distribution) would be:

Upper95CI = mean + 1.96*stdev

Lower95CI = mean - 1.96*stdev

You can generate those two columns from the fields returned by the Summary platform. Those formulas will get you pretty close to what you are looking for.

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: 95% confidence intervals

Hi mzwald,

i have used the following and has worked a treat

`New Column( "Lower 95% CI", Numeric, Continuous, Formula ( Round(:Name ("Mean(l10t)") - (:Name("Std Err(l10t)") * t Quantile (0.975,23)), 4)));`

if i have used the following to create a variable

```
dt2<< Summary(
Group( :Sample ),
Mean( :dilution factor, :l10t ),
Freq( "None" ),
Weight( "None" ),
Output Table( "log10t" ),
Std Err( :l10t ),
Link to original data table(0)
);
```

and i would like to round the variable Mean(l10t), to four decimal places, can you do that from the above block of syntax???

thanks

Mickyboy

Article Labels

There are no labels assigned to this post.