Ajktulm Tracker
https://communities.sas.com/kntur85557/tracker
Ajktulm TrackerWed, 24 Apr 2024 18:38:29 GMT2024-04-24T18:38:29ZHow to define class-like variable in PROC NLMIXED?
https://communities.sas.com/t5/SAS-Procedures/How-to-define-class-like-variable-in-PROC-NLMIXED/m-p/601719#M76401
<P>I'm trying to model the some variable according to the normal distribution with the following parameters:</P><P>- It has some mean, depending on in which class it is (for this I have the indicator variables V3,V4,V5,V6 which for each entry one is 1, the others are 0) and some variance depending on a few parameters: the group, subgroup, device and method. Now all these have some normal distribution with mean 0 and unknown variance (it is the variance that I want to model), but all groups are identically distributed (so group 1 and 2 follow the same distribution), but within a group all values are the same (so the contribution that being in group 1 yields to every sample in the group is the same). In total I get</P><P> </P><P>V2 = mean + variance caused by group + variance caused by subgroup + variance caused by device + variance caused by method</P><P> </P><P>Where all variances are stochastic and assumed to be normal(0,x) where I want to find the 4 x's..</P><P> </P><P>I wanted to do this with proc NLmixed and classifying the group,subset,device,method as class variables, but that doesn't exist... so my question is how to deal with this problem? The code I have is</P><P> </P><P>PROC NLMIXED DATA=para1;</P><P>PARMS a = 0.00001, b = 0.000001, c = 0.000001,d = 0.000001,e = 0.000001;<BR />mu = a + b*V3 + c*V4 + d*V5 + e*V6;<BR />sigma = ???;<BR />MODEL V2 ~ Normal(mu,sigma);<BR />RUN;</P><P> </P><P>where if I take for example sigma=0.00001 I can find the a,b,c,d,e I'm looking for, but I also want to estimate the variances.</P>Tue, 05 Nov 2019 17:24:33 GMThttps://communities.sas.com/t5/SAS-Procedures/How-to-define-class-like-variable-in-PROC-NLMIXED/m-p/601719#M76401Ajktulm2019-11-05T17:24:33ZHow do I fit an equation?
https://communities.sas.com/t5/Statistical-Procedures/How-do-I-fit-an-equation/m-p/564683#M27857
<P>I have to a model</P><P>threshold = 100 -2*deltat + c1*sigma^a + c2*deltat^2 + c3*sigma^c * deltat^d</P><P>where I know 0<threshold<100 as it is in all my datapoints (<A href="https://pastebin.com/3pYiNFf1" target="_blank" rel="noopener">https://pastebin.com/3pYiNFf1</A>)</P><P> </P><P>To do this I run the following code (and I am fully aware this approach is incredibly stupid/ridiculous but I can't think of anything better) using the nlmixed procedure with as model the binomial distribution with 100 trials, and succes chance hopefully threshold/100. </P><P> </P><P>PROC NLMIXED data=BEP;<BR />PARMS c1=-1, c2=0, c3=0, a=1, b=1, c=1, d=1;<BR />p = (100 - 2*deltat + c1*sigma**(a) + c2*deltat**(b) + c3*sigma**(c) * deltat**(d))/100;<BR />model threshold ~ binomial(100,p);<BR />run;</P><P> </P><P>However when running this I get no output and the log says </P><DIV class="sasNote">NOTE: Execution error for observation 1.</DIV><DIV class="sasNote">NOTE: The SAS System stopped processing this step because of errors.</DIV><DIV class="sasNote"> </DIV><DIV class="sasNote">Although I do get results if I remove the parameters a,b,c,d, I don't get any results when I include them.</DIV><DIV class="sasNote"> </DIV><DIV class="sasNote">This was run using SAS university edition version 3.8</DIV>Sat, 08 Jun 2019 17:26:11 GMThttps://communities.sas.com/t5/Statistical-Procedures/How-do-I-fit-an-equation/m-p/564683#M27857Ajktulm2019-06-08T17:26:11Z