취소
다음에 대한 결과 표시 
표시  만  | 다음에 대한 검색 
다음을 의미합니까? 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
See how to use to use Text Explorer to glean valuable information from text data at April 25 webinar.
언어 선택 변환 막대 숨기기
게시된 스레드 원본 보기

가중 카파스

bky
bky
Level I

안녕하세요. 두 명의 평가자가 50개 항목의 품질을 1~4점 척도로 평가하는 연구가 있습니다. 우리는 JMP에서 가중치 카파를 수행하고 싶었습니다. 데이터를 입력하고 데이터 유형을 순서형으로 설정했는데 JMP에서는 Y를 X로 피팅하고 합치도 통계를 보면 간단한 카파만 생성되는 것 같습니다.

JMP에서는 가중치 카파를 계산할 수 있나요?

미리 감사드립니다!

원래 English (US) 로 작성된 이 게시물은 귀하의 편의를 위해 번역되었습니다. 답장을 보내면 English (US) 로 다시 번역됩니다.

19 응답 19
lcmaley
Level I

답: 가중 카파스

귀하의 스크립트를 사용하려고 하는데 이것을 마지막에 넣었습니다.

dt0 = Current Data Table();

CT = dt0 << Contingency(
Contingency Table( Expected( 1 )), Agreement Statistic( 1 ), Tests(0) );

WeightedKappa( CT );

작동하지 않으며 아무것도 추가되지 않습니다. 내가 도대체 ​​뭘 잘못하고있는 겁니까?

분할표가 아니라는 오류가 발생하고 아무 것도 추가되지 않습니다. 제안?

원래 English (US) 로 작성된 이 게시물은 귀하의 편의를 위해 번역되었습니다. 답장을 보내면 English (US) 로 다시 번역됩니다.

gzmorgan0
Super User (Alumni)

답: 가중 카파스

@lcmaley ,

몇 년 동안 대본을 보지 않았기 때문에 녹을 좀 털어내야 했습니다.

사용 중인 JMP 버전을 항상 언급해야 합니다. 즉, 2021년에 게시된 @ghartel 의 솔루션을 사용하는 것이 좋습니다.

@ghartel 게시물에 제공된 Weighted Kappa Function.jsl을 다운로드하고 스크립트용 드라이브에 저장하세요.

Weighted Kappa Function 솔루션에는 Std Err 및 신뢰 한계는 물론 By 변수도 포함되어 있습니다. 내 스크립트는 그렇지 않았습니다. @ghartel 의 솔루션은 훨씬 더 나은 솔루션입니다.

다음은 원래 스크립트와 함께 제공된 샘플 테이블에 대해 Weighted Kappa 함수를 실행하는 데 사용한 JSL입니다. 첨부된 JMP 테이블 Slide58.jmp 결과 스크린샷을 참조하세요.

메모:

  • Udir은 원하는 드라이브가 될 수 있으며 데이터 테이블과 기능은 다른 디렉터리에 있을 수 있습니다.
  • 비상 사태에 대한 각 옵션을 호출할 필요는 없습니다. 기본값이 설정되어 있을 가능성이 높습니다. 그러나 개수 및 예상은 비상 플랫폼 옵션에 포함되거나 스크립트에서 호출되어야 합니다.

훌륭한 기능을 제공한 @ghartel 에게 찬사를 보냅니다!

Names Default to Here(1);
Udir ="C:\temp";

dt = open(Udir || "\slide58.jmp");

Include( Udir || "\Weighted Kappa Function.jsl" );

CT = dt << Contingency(
	Y( :Y ),
	X( :X ),
	Freq( :n ),
	Contingency Table(
		Count( 1, Format( "Fixed Dec", 8, 0 ) ),
		Total %( 1, Format( "Fixed Dec", 8, 2 ) ),
		Col %( 1, Format( "Fixed Dec", 8, 2 ) ),
		Row %( 1, Format( "Fixed Dec", 8, 2 ) ),
		Expected( 1, Format( "Best", 8 ) ),
		Deviation( 0, Format( "Best", 8 ) ),
		Cell Chi Square( 0, Format( "Fixed Dec", 8, 4 ) ),
		Col Cum( 0, Format( "Fixed Dec", 8, 0 ) ),
		Col Cum %( 0, Format( "Fixed Dec", 8, 2 ) ),
		Row Cum( 0, Format( "Fixed Dec", 8, 0 ) ),
		Row Cum %( 0, Format( "Fixed Dec", 8, 2 ) )
	),
	Agreement Statistic( 1 )
);


WeightedKappa(CT);

원래 English (US) 로 작성된 이 게시물은 귀하의 편의를 위해 번역되었습니다. 답장을 보내면 English (US) 로 다시 번역됩니다.

gzmorgan0
Super User (Alumni)

답: 가중 카파스

첨부 파일을 참조

원래 English (US) 로 작성된 이 게시물은 귀하의 편의를 위해 번역되었습니다. 답장을 보내면 English (US) 로 다시 번역됩니다.

lcmaley
Level I

답: 가중 카파스

죄송합니다. Mac에서 JMP Pro 17.0.0을 사용하고 있습니다. 나는 당신이 가지고 있는 것을 시도했지만 경로가 계속 복제되었습니다. 그래서 나는 그것을 다음과 같이 바꿨습니다.

dt = open("Subset of Data for Kappa index.jmp");

Include("Weighted Kappa.jsl" );

그러면 파일이 열리지만(먼저 여기에 있는 파일을 시험해 보고 있는데 내 파일은 좀 더 복잡해서 여기 있는 파일과 제대로 작동하는지 확인하고 싶었습니다) 다음과 같은 오류가 발생합니다.

Weighted Kappa.jsl은 닫힌 경로를 통해 자신을 포함합니다.:

'Include' 액세스 또는 평가 시 가중치 Kappa.jsl,

포함/*###*/("Weighted Kappa.jsl")

원래 English (US) 로 작성된 이 게시물은 귀하의 편의를 위해 번역되었습니다. 답장을 보내면 English (US) 로 다시 번역됩니다.

ghartel
Level III

답: 가중 카파스

당신은 말해야

include("Weighted Kappa Function.jsl");

원래 English (US) 로 작성된 이 게시물은 귀하의 편의를 위해 번역되었습니다. 답장을 보내면 English (US) 로 다시 번역됩니다.

lcmaley
Level I

답: 가중 카파스

처음에 그렇게 해봤는데 안 되더군요. 그것이 내 스크립트의 이름이기 때문에 기능 없음으로 변경했습니다. Weighted Kappa Function.jsl과 일치하도록 스크립트를 변경했는데 여전히 작동하지 않습니다. 같은 오류가 발생합니다.

Weighted Kappa.jsl은 닫힌 경로를 통해 자신을 포함합니다.:

'Include' 액세스 또는 평가 시 가중치 Kappa.jsl,

포함/*###*/("가중 카파 함수.jsl")

다음은 함수와 함께 넣는 코드입니다.

Names Default to Here(1);

dt = open("Subset of Data for Kappa index.jmp");

Include("Weighted Kappa Function.jsl" );

CT = dt << Contingency(
	
	Contingency Table(
		Count( 1, Format( "Fixed Dec", 8, 0 ) ),
		Total %( 1, Format( "Fixed Dec", 8, 2 ) ),
		Col %( 1, Format( "Fixed Dec", 8, 2 ) ),
		Row %( 1, Format( "Fixed Dec", 8, 2 ) ),
		Expected( 1, Format( "Best", 8 ) ),
		Deviation( 0, Format( "Best", 8 ) ),
		Cell Chi Square( 0, Format( "Fixed Dec", 8, 4 ) ),
		Col cumulative( 0, Format( "Fixed Dec", 8, 0 ) ),
		Col cumulative %( 0, Format( "Fixed Dec", 8, 2 ) ),
		Row cumulative( 0, Format( "Fixed Dec", 8, 0 ) ),
		Row cumulative %( 0, Format( "Fixed Dec", 8, 2 ) )
	),
	Agreement Statistic( 1 )
);


WeightedKappa(CT);

원래 English (US) 로 작성된 이 게시물은 귀하의 편의를 위해 번역되었습니다. 답장을 보내면 English (US) 로 다시 번역됩니다.

ghartel
Level III

답: 가중 카파스

실제로 비상표를 받고 있나요? 테이블에 X와 Y를 지정하는 것을 볼 수 없습니다. 다음 코드는 내 시스템(V17.2.0, Windows 10)에서 작동합니다.

Names Default To Here( 1 );
Include("Weighted Kappa Function.jsl" );
dt = Open( "$SAMPLE_DATA/Prime Minister Ratings.jmp" );
CT = dt << Contingency(
	Y( :Second Survey ),
	X( :First Survey ),
	Freq( :Count ),
	Tests( 0 ),
	Agreement Statistic( 1 )
);

WeightedKappa(CT);

원래 English (US) 로 작성된 이 게시물은 귀하의 편의를 위해 번역되었습니다. 답장을 보내면 English (US) 로 다시 번역됩니다.

lcmaley
Level I

Re: Weighted Kappas

Sorry, I was traveling.  This way I do not get a contingency table.  I tried it with the X and Y specified and did the same thing.  I just took the X and Y out so I could use it with any table.  It just brings up the dialog box for me to enter the X and Y.

 

dt = Open( "Subset of Data for Kappa index.jmp" );

Include( "Weighted Kappa Function.jsl" );

CT = dt << Contingency(
	
	Contingency Table(
		Y( :BP1),
		X( :BP2 ),
		Count( 1, Format( "Fixed Dec", 8, 0 ) ),
		Total %( 1, Format( "Fixed Dec", 8, 2 ) ),
		Col %( 1, Format( "Fixed Dec", 8, 2 ) ),
		Row %( 1, Format( "Fixed Dec", 8, 2 ) ),
		Expected( 1, Format( "Best", 8 ) ),
		Deviation( 0, Format( "Best", 8 ) ),
		Cell Chi Square( 0, Format( "Fixed Dec", 8, 4 ) ),
		Col cumulative( 0, Format( "Fixed Dec", 8, 0 ) ),
		Col cumulative %( 0, Format( "Fixed Dec", 8, 2 ) ),
		Row cumulative( 0, Format( "Fixed Dec", 8, 0 ) ),
		Row cumulative %( 0, Format( "Fixed Dec", 8, 2 ) )
	),
	Agreement Statistic( 1 )
);


WeightedKappa( CT );

I do get a contingency table when I run this, but nothing is appended:

dt0 = Current Data Table();

tsub = Subscribe to Data Table List( , On Open( WeightedKappa ) );

reportc = Contingency(
	Contingency Table( Expected( 1 ) ),
	Agreement Statistic( 1 ),
	<<Make Into Data Table
);


Unsubscribe to Data Table List( tsub );

lcmaley_0-1710247375077.png

 

 

Re: Weighted Kappas

I tried the exact same code and it worked up to reporting the contingency table, but it showed "Wrong dimensionnally" and did not calculate the weighted kappa. (JMP18.01, Win11)

Re: Weighted Kappas

It seems to be a language problem with JMP. I modified "Cell" in the script to Japanese and it works. Thanks for the great job.