cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-235574%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EIntervalos%20de%20confianza%20del%2095%25%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-235574%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHola%20a%20todos%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEstoy%20tratando%20de%20obtener%20un%20resumen%20de%20una%20tabla%20de%20datos%2C%20me%20gustar%C3%ADa%20la%20media%20de%20una%20variable%20l10t%2C%20el%20error%20est%C3%A1ndar%20y%20el%20intervalo%20de%20confianza%20del%2095%25.%20Todo%20parec%C3%ADa%20bastante%20sencillo%2C%20pero%20estoy%20teniendo%20problemas%20con%20los%20intervalos%20de%20confianza%20del%2095%25%2C%20he%20intentado%20diferentes%20formas%20en%20vano%2C%20actualmente%20tengo%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edt2%26lt%3B%26lt%3B%20Summary(%0A%20Group(%20%3ASample%20)%2C%0A%20Mean(%20%3Adilution%20factor%2C%20%3Al10t%20)%2C%0A%20Freq(%20%22None%22%20)%2C%0A%20Weight(%20%22None%22%20)%2C%0A%20Output%20Table(%20%22log10t%22%20)%2C%0A%20Std%20Err(%20%3Al10t%20)%2C%0A%20Confidence%20Interval(%20%3Al10t%2C%200.95)%2C%0A%20Link%20to%20original%20data%20table(0)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EObviamente%20estoy%20haciendo%20algo%20incorrectamente%2C%20%C2%BFalguien%20puede%20ofrecer%20alg%C3%BAn%20consejo%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMontones%20de%20gracias%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-235590%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20intervalos%20de%20confianza%20del%2095%25%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-235590%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EPuedes%20lograr%20algo%20similar%20a%20esto%3A%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%2FBig%20Class.jmp%22%20)%3B%0Aplatform%20%3D%20dt%20%26lt%3B%26lt%3B%20Oneway(%0A%20Y(%20%3Aheight%20)%2C%0A%20X(%20%3Asex%20)%2C%0A%20Means%20and%20Std%20Dev(%201%20)%2C%0A%20Box%20Plots(%201%20)%2C%0A%20Mean%20Diamonds(%201%20)%2C%0A%20Mean%20Error%20Bars(%201%20)%2C%0A%20Std%20Dev%20Lines(%201%20)%2C%0A%20Connect%20Means(%201%20)%2C%0A%20Points%20Jittered(%201%20)%2C%0A%20Grand%20Mean(%200%20)%0A)%3B%0AWait(%200%20)%3B%0AReport(%20platform%20)%5BOutline%20Box(%20%22Oneway%20Analysis%20of%20height%20By%20sex%22%20)%5D%5B%0AOutline%20Box(%20%22Means%20and%20Std%20Deviations%22%20)%5D%5BTable%20Box(%201%20)%5D%20%26lt%3B%26lt%3B%20Make%20Into%20Data%20Table%3B%0AReport(%20platform%20)%20%26lt%3B%26lt%3B%20Close%20Window%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EColoque%20su%20variable%20de%20grupo%20en%20el%20rol%20X%20().%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-235848%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20intervalos%20de%20confianza%20del%2095%25%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-235848%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHola%20mzwald%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMuchas%20gracias%20por%20su%20ayuda%20y%20su%20sugerencia%2C%20prob%C3%A9%20este%20c%C3%B3digo%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Eplatform%20%3D%20dt2%20%26lt%3B%26lt%3B%20Oneway(%0A%20Y(%20%3Al10t%20)%2C%0A%20X(%20%3Afold%20dilution%20)%2C%0A%20Means%20and%20Std%20Dev(%201%20)%2C%0A%20Box%20Plots(%201%20)%2C%0A%20Mean%20Diamonds(%201%20)%2C%0A%20Mean%20Error%20Bars(%201%20)%2C%0A%20Std%20Dev%20Lines(%201%20)%2C%0A%20Connect%20Means(%201%20)%2C%0A%20Points%20Jittered(%201%20)%2C%0A%20Grand%20Mean(%200%20)%0A)%3B%0AWait(%200%20)%3B%0AReport(%20platform%20)%5BOutline%20Box(%20%22Oneway%20Analysis%20of%20height%20By%20sex%22%20)%5D%5B%0AOutline%20Box(%20%22Means%20and%20Std%20Deviations%22%20)%5D%5BTable%20Box(%201%20)%5D%20%26lt%3B%26lt%3B%20Make%20Into%20Data%20Table%3B%0AReport(%20platform%20)%20%26lt%3B%26lt%3B%20Close%20Window%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3Ey%20recib%C3%AD%20el%20siguiente%20mensaje%20de%20error%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ECannot%20subscript%20Display%20Box%20in%20access%20or%20evaluation%20of%20'Report(platform)%5BOutline%20Box(%22Oneway%20Analysis%20of%20height%20By%20sex%22)%5D'%20%2C%20Report(%20platform%20)%5B%2F*%23%23%23*%2FOutline%20Box(%20%22Oneway%20Analysis%20of%20height%20By%20sex%22%20)%5D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3ESin%20embargo%2C%20estoy%20casi%20all%C3%AD%20en%20cuanto%20a%20lo%20que%20quiero%20lograr%20para%20mi%20tabla%20de%20datos%20con%20esto%2C%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edt2%26lt%3B%26lt%3B%20Summary(%0A%20Group(%20%3ASample%20)%2C%0A%20Mean(%20%3Adilution%20factor%2C%20%3Al10t%20)%2C%0A%20Freq(%20%22None%22%20)%2C%0A%20Weight(%20%22None%22%20)%2C%0A%20Output%20Table(%20%22log10t%22%20)%2C%0A%20Std%20Err(%20%3Al10t%20)%2C%0A%20Confidence%20Interval(%20%3AName%20(%22Mean(l10t)%22))%2C%0A%20Link%20to%20original%20data%20table(0)%0A)%3B%0A%0ALoq%20%3D%20Data%20Table(%20%22log10t%22%20)%3B%0A%0ALoq%20%26lt%3B%26lt%3B%20New%20Column(%20%22Back%20T'sform%20Mean%22%2C%20Numeric%2C%20Continuous%2C%20Formula(%20Round(10%5E%3AName%20(%22Mean(l10t)%22)%2C0)))%3B%0A%0ALoq%20%26lt%3B%26lt%3B%20New%20Column(%20%22Back%20T'sform%20Std%20error%22%2C%20Numeric%2C%20Continuous%2C%20Formula(10%5E%3AName%20(%22Std%20Err(l10t)%22)%2C%20Format(%20%22fixed%20dec%22%2C%206%2C%200%20)%20)%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3Ed%C3%A1ndome%20esto%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Data%20Table.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F20411iBA2DCCE33FDA71D1%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Data%20Table.PNG%22%20alt%3D%22Data%20Table.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%26nbsp%3Bas%C3%AD%20que%20estoy%20casi%20all%C3%AD%2C%20esperaba%20que%20los%20intervalos%20de%20confianza%20fueran%20una%20sola%20l%C3%ADnea%20de%20c%C3%B3digo%20simple.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGracias%3C%2FP%3E%3CP%3EMickyboy%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-235992%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20intervalos%20de%20confianza%20del%2095%25%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-235992%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EBueno%2C%20parece%20que%20Summary%20no%20admite%20actualmente%20CI's%2C%20pero%20siempre%20puedes%20hacer%20una%20f%C3%B3rmula%20para%20ellos.%20%3CBR%20%2F%3E%20Las%20f%C3%B3rmulas%20para%20un%20intervalo%20de%20confianza%20del%2095%25%20(suponiendo%20una%20distribuci%C3%B3n%20normal)%20ser%C3%ADan%3A%20%3CBR%20%2F%3E%20Upper95CI%20%3D%20media%20%2B%201.96%20*%20stdev%20%3CBR%20%2F%3E%20Lower95CI%20%3D%20media%20-%201.96%20*%20stdev%20%3CBR%20%2F%3E%20Puede%20generar%20esas%20dos%20columnas%20a%20partir%20de%20los%20campos%20devueltos%20por%20la%20plataforma%20Resumen.%20Esas%20f%C3%B3rmulas%20lo%20acercar%C3%A1n%20bastante%20a%20lo%20que%20est%C3%A1%20buscando.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-236420%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20intervalos%20de%20confianza%20del%2095%25%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-236420%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHola%20mzwald%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHe%20usado%20lo%20siguiente%20y%20he%20trabajado%20de%20maravilla%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENew%20Column(%20%22Lower%2095%25%20CI%22%2C%20Numeric%2C%20Continuous%2C%20Formula%20(%20Round(%3AName%20(%22Mean(l10t)%22)%20-%20(%3AName(%22Std%20Err(l10t)%22)%20*%20t%20Quantile%20(0.975%2C23))%2C%204)))%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3Esi%20he%20usado%20lo%20siguiente%20para%20crear%20una%20variable%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edt2%26lt%3B%26lt%3B%20Summary(%0A%20Group(%20%3ASample%20)%2C%0A%20Mean(%20%3Adilution%20factor%2C%20%3Al10t%20)%2C%0A%20Freq(%20%22None%22%20)%2C%0A%20Weight(%20%22None%22%20)%2C%0A%20Output%20Table(%20%22log10t%22%20)%2C%0A%20Std%20Err(%20%3Al10t%20)%2C%0A%20Link%20to%20original%20data%20table(0)%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3Ey%20me%20gustar%C3%ADa%20redondear%20la%20variable%20Media%20(l10t)%20a%20cuatro%20decimales%2C%20%C2%BFpuedes%20hacer%20eso%20desde%20el%20bloque%20de%20sintaxis%20anterior%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGracias%3C%2FP%3E%3CP%3EMickyboy%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
Mickyboy
Level V

95% confidence intervals

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

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.

Mickyboy
Level V

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,

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

 

Thanks

Mickyboy

Re: 95% confidence intervals

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.

Mickyboy
Level V

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

Recommended Articles