BookmarkSubscribeRSS Feed
Ajktulm
Calcite | Level 5

I'm trying to model the some variable according to the normal distribution with the following parameters:

- 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

 

V2 = mean + variance caused by group + variance caused by subgroup + variance caused by device + variance caused by method

 

Where all variances are stochastic and assumed to be normal(0,x) where I want to find the 4 x's..

 

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

 

PROC NLMIXED DATA=para1;

PARMS a = 0.00001, b = 0.000001, c = 0.000001,d = 0.000001,e = 0.000001;
mu = a + b*V3 + c*V4 + d*V5 + e*V6;
sigma = ???;
MODEL V2 ~ Normal(mu,sigma);
RUN;

 

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.

1 REPLY 1
DWilson
Pyrite | Level 9

@Ajktulm wrote:

I'm trying to model the some variable according to the normal distribution with the following parameters:

- 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

 

V2 = mean + variance caused by group + variance caused by subgroup + variance caused by device + variance caused by method

 

Where all variances are stochastic and assumed to be normal(0,x) where I want to find the 4 x's..

 

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

 

PROC NLMIXED DATA=para1;

PARMS a = 0.00001, b = 0.000001, c = 0.000001,d = 0.000001,e = 0.000001;
mu = a + b*V3 + c*V4 + d*V5 + e*V6;
sigma = ???;
MODEL V2 ~ Normal(mu,sigma);
RUN;

 

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.


 

See example 82.6:

https://support.sas.com/documentation/onlinedoc/stat/141/nlmixed.pdf

 

 

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
  • 1 reply
  • 399 views
  • 0 likes
  • 2 in conversation