BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
UcheOkoro
Lapis Lazuli | Level 10

Hello, 

 

Please, I need to compare two non nested  models. Please, I need help with SAS code for Monte Carlo simulation in structural equation modeling to do this comparison.

 

Thank you

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

I'm confused. The title of your post is "Monte Carlo simulation in structural equation modeling in SAS." But now you are asking about how to compare two logistic models.  

 

If you want to compare two logistic models, one way is to compare the area under their ROC curves (C statistic). See https://communities.sas.com/t5/Statistical-Procedures/how-to-compare-two-models/td-p/121251

 

For other options, see https://www.lexjansen.com/mwsug/2016/AA/MWSUG-2016-AA19.pdf

 

View solution in original post

4 REPLIES 4
Rick_SAS
SAS Super FREQ

As a starter, you need to know how to simulate multivariate normal data and data for a linear regression model. If you have a moderately complicated model with multivariate relationships, I suggest you use SAS/IML software rather than the DATA step in Base SAS. Here are some tips to get you started:

SEM models are fairly complicated, so be sure to master the basics before you attempt SEM.

UcheOkoro
Lapis Lazuli | Level 10

Thank you so much for your response. I would like to compare the following two non-nested models. I do not want simulate a data set. Please, what is the best way to do this?

 

/****MODEL WITH SEPSIS, SURGERY AND ED_DISPO*****/
   PROC LOGISTIC DATA=Averasepsis_data10C3b OUTEST=_LNLIKE4_ DESC;
  CLASS  triage_pulse2(ref='<96') Lactate1_cat(ref='<2')  mode_arrival(ref='private tranp') bmi2(ref='<18.5') total_sofa1_ed2(ref='<4') pmh_copd(ref='No') 
pmh_cirrhosis(ref='No')  pmh_transplant(ref='No') pmh_cancer(ref='No') Age2(ref='<30') pmh_diabetes(ref='No') pmh_dialysis(ref='No') infection_ed_source3(ref='resp_pnuem')
 sex2(ref='Male') RUCA2(ref='Two') ed_provider_type2(ref='Physician') ICU_yn(ref='No') sepsis_septic_diag(ref='No') sepsis_septic_diag(ref='No')ed_dispo(ref='Admit') surgery(ref='No');
	MODEL telemed_use (Event='Yes') =  triage_pulse2 Lactate1_cat triage_systolic mode_arrival delta_SOFA bmi2 citypop_2019
EDVolume_2019 totalbeds transferdist sex2 RUCA2 ed_provider_type2 ICU_yn sepsis_septic_diag ed_dispo surgery/lackfit rsquare;
  RUN;

  /****MODEL WITH SEPSIS and SURGERY*****/
   PROC LOGISTIC DATA=Averasepsis_data10C3b OUTEST=_LNLIKE5_ DESC;
  CLASS  triage_pulse2(ref='<96') Lactate1_cat(ref='<2')  mode_arrival(ref='private tranp') bmi2(ref='<18.5') total_sofa1_ed2(ref='<4') pmh_copd(ref='No') 
pmh_cirrhosis(ref='No')  pmh_transplant(ref='No') pmh_cancer(ref='No') Age2(ref='<30') pmh_diabetes(ref='No') pmh_dialysis(ref='No') infection_ed_source3(ref='resp_pnuem')
 sex2(ref='Male') RUCA2(ref='Two') ed_provider_type2(ref='Physician') ICU_yn(ref='No') sepsis_septic_diag(ref='No') sepsis_septic_diag(ref='No') surgery(ref='No');
	MODEL telemed_use (Event='Yes') =  triage_pulse2 Lactate1_cat triage_systolic mode_arrival delta_SOFA bmi2 citypop_2019
EDVolume_2019 totalbeds transferdist sex2 RUCA2 ed_provider_type2 ICU_yn sepsis_septic_diag surgery/lackfit rsquare;
  RUN;
Rick_SAS
SAS Super FREQ

I'm confused. The title of your post is "Monte Carlo simulation in structural equation modeling in SAS." But now you are asking about how to compare two logistic models.  

 

If you want to compare two logistic models, one way is to compare the area under their ROC curves (C statistic). See https://communities.sas.com/t5/Statistical-Procedures/how-to-compare-two-models/td-p/121251

 

For other options, see https://www.lexjansen.com/mwsug/2016/AA/MWSUG-2016-AA19.pdf

 

UcheOkoro
Lapis Lazuli | Level 10

Thank you so much, Rick_SAS. This was very helpful!

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 760 views
  • 0 likes
  • 2 in conversation