BookmarkSubscribeRSS Feed
emma19901
Calcite | Level 5

Hi, I am trying to calculate power for a hypothetical cohort study, I have run in multiple times this code but I still receive the same error 180-322.

 

Thanks in advance!

 

groupweights=(1 9)/*Divide ntotal 9 to 1 between the groups => n2=9*n1, where n1 = exposed sample size & n2 = unexposed sample size*/
ntotal=120000 /*120,000 total participants in the study*/
power=.; /*Calculate power*/

 

OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 proc groupweights=(1|9)/*Divide ntotal 9 to 1 between the groups => n2=9*n1, where n1 = exposed sample size & n2 =
73 ! unexposed sample size*/
ERROR: Procedure GROUPWEIGHTS not found.
74 ntotal=120000 /*120,000 total participants in the study*/
75 power=.; /*Calculate power*/
76
77 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
1 REPLY 1
Reeza
Super User

WHere's the rest of the code? The PROC POWER statement for starters?

 

73 proc groupweights=

 

And the rest of that code doesn't look close to correct. 

 

See the documentation reference here:

http://documentation.sas.com/?docsetId=statug&docsetTarget=statug_power_toc.htm&docsetVersion=14.3&l...

 

See the examples section for various full examples. 

 


@emma19901 wrote:

Hi, I am trying to calculate power for a hypothetical cohort study, I have run in multiple times this code but I still receive the same error 180-322.

 

Thanks in advance!

 

groupweights=(1 9)/*Divide ntotal 9 to 1 between the groups => n2=9*n1, where n1 = exposed sample size & n2 = unexposed sample size*/
ntotal=120000 /*120,000 total participants in the study*/
power=.; /*Calculate power*/

 

OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 proc groupweights=(1|9)/*Divide ntotal 9 to 1 between the groups => n2=9*n1, where n1 = exposed sample size & n2 =
73 ! unexposed sample size*/
ERROR: Procedure GROUPWEIGHTS not found.
74 ntotal=120000 /*120,000 total participants in the study*/
75 power=.; /*Calculate power*/
76
77 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1462 views
  • 0 likes
  • 2 in conversation