<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Multivariate probit model in NLMIXED in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-probit-model-in-NLMIXED/m-p/915713#M45435</link>
    <description>&lt;P&gt;You should be able to do this more simply using the joint modeling approach available in PROC GLIMMIX. See the example titled "Joint Modeling of Binary and Count Data" in the GLIMMIX documentation.&lt;/P&gt;</description>
    <pubDate>Mon, 12 Feb 2024 21:52:56 GMT</pubDate>
    <dc:creator>StatDave</dc:creator>
    <dc:date>2024-02-12T21:52:56Z</dc:date>
    <item>
      <title>Multivariate probit model in NLMIXED</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-probit-model-in-NLMIXED/m-p/915649#M45429</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to fit a multivariate probit model for two ordinal responses, but I do not see how I can estimate the correlation between the underlying latent continuous variables (and let this correlation depend on the covariates). My code now looks like this:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc nlmixed data=mvp.mydata qpoints=5 maxiter=1000 
maxfunc=10000 technique=quanew gconv=1e-8;
eta_d = beta_d_gender*gender+
beta_d_statsoc*STATSOC1+beta_d_gewest*GEWEST1;
eta_s = beta_s_gender*gender+beta_s_bmi*BMI2+
beta_s_age*AGE+
beta_s_statsoc1*STATSOC1+beta_s_statsoc2*STATSOC2;
if var='X' then do;
if response =0 then do;
lik = cdf('NORMAL',(int_drink1-eta_d));
end;
if response =1 then do;
lik = cdf('NORMAL',(int_drink2-eta_d)) -
cdf('NORMAL',(int_drink1-eta_d));
end;
if response =2 then do;
lik = cdf('NORMAL',(int_drink3-eta_d))-
cdf('NORMAL',(int_drink2-eta_d));
end;
if response =3 then do;
lik = 1 -cdf('NORMAL',(int_drink3-eta_d));
end;
ll = log(lik);
end;
if var='Y' then do;
if response =1 then do;
lik = cdf('NORMAL',(int_smoke1-eta_s));
end;
if response =2 then do;
lik = cdf('NORMAL',(int_smoke2-eta_s)) -
cdf('NORMAL',(int_smoke1-eta_s));
end;
if response =3 then do;
lik = 1-cdf('NORMAL',(int_smoke2-eta_s));
end;
ll = log(lik);
end;
model response ~ general(ll);
correlatie=corr(eta_d,eta_s);
ods output parameterestimates=parms_joint;
run;&lt;/PRE&gt;
&lt;P&gt;SAS gives now the error 'ERROR: Cannot find a library containing subroutine CORR.'. Does anyone know how I can estimate the correlation between the latent variables?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Suggestions for other procedures that can do this are also welcome!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Marc&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 19:38:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-probit-model-in-NLMIXED/m-p/915649#M45429</guid>
      <dc:creator>mgx</dc:creator>
      <dc:date>2024-02-12T19:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: Multivariate probit model in NLMIXED</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-probit-model-in-NLMIXED/m-p/915661#M45431</link>
      <description>&lt;P&gt;Do you have estimates of the variances and the covariance? You could then try to calculate a correlation that way by using PROC FCMP or macro code to get a value for the correlation. No guarantees, though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 19:35:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-probit-model-in-NLMIXED/m-p/915661#M45431</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2024-02-12T19:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: Multivariate probit model in NLMIXED</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-probit-model-in-NLMIXED/m-p/915663#M45432</link>
      <description>&lt;P&gt;It sounds like you want the sample Pearson correlation between the latent variables in the model, not a correlation between parameters. If so, use the PREDICT statement to write the predicted value to a data set and then use PROC CORR. It will look something like this (untested)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc nlmixed ...;
...
   predict eta_d  out=Var1;  /* output variable is named Pred */
   predict eta_s out=Var2;  /* same */
run;

data All;
merge Var1(keep=Pred rename=(Pred=eta_d)) 
      Var2(keep=Pred rename=(Pred=eta_s)); 
run;

proc corr data=All;
var eta_d eta_s;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 19:41:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-probit-model-in-NLMIXED/m-p/915663#M45432</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2024-02-12T19:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Multivariate probit model in NLMIXED</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-probit-model-in-NLMIXED/m-p/915713#M45435</link>
      <description>&lt;P&gt;You should be able to do this more simply using the joint modeling approach available in PROC GLIMMIX. See the example titled "Joint Modeling of Binary and Count Data" in the GLIMMIX documentation.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 21:52:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-probit-model-in-NLMIXED/m-p/915713#M45435</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2024-02-12T21:52:56Z</dc:date>
    </item>
  </channel>
</rss>

