turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Estimating random effect when there exist none (si...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted
# Estimating random effect when there exist none (simulation)

[ Edited ]
Options

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

3 weeks ago - last edited 3 weeks ago

Hi all,

I am trying to run simulation for a mixed model. For one of the variable (xij) I do not add random effect (non-varying) at the data generation process but try to estimate the random effect during the estimation process. The expectation is that estimated variance component should be zero but it is not. This is the case even group-mean centering the variable. Is there an obvious explanation for this? I am not familiar with the estimation procedure of the PROC MIXED. The data generating mechanism and the model is below

```
* Level-1 Model
* yij = beta0j + beta1j*xij + .50*vij + rij
* Level-2 Model
* beta0j = gamma00 + gamma01*tj + u0j
* beta1j = gamma10 + gamma11*tj
```

I am trying to estimate random term for xij with PROC MIXED as

```
proc mixed data=SimData2 covtest NOCLPRINT method = REML;
class SchID;
model yij = xij / ddfm = BW solution;
random INTERCEPT xij /subject = SchID type=UN g gcorr;
ods output CovParms=CovParms1 SolutionF=SolutionF1;
by SampleID;
run;quit;
```

Please help,

Thanks

Accepted Solutions

Solution

3 weeks ago

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to MetinBulus

3 weeks ago - last edited 3 weeks ago

But the average doesn't have to be zero, no matter how many runs you make (unless you can do an infinite number of runs).

The real test is as I described, that the values are not statistically different than zero, 95% of the time.

--

Paige Miller

Paige Miller

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to MetinBulus

3 weeks ago - last edited 3 weeks ago

Perhaps this is just a difference in wording, but I would not agree with this statement:

The expectation is that estimated variance component should be zero but it is not

I would say there that the estimated variance component should *not be statistically different* than zero, 95% of the time (assuming you do the test with alpha = 0.05 and the errors are iid normal)

But in an individual run a non-zero estimated variance component does not bother me.

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to PaigeMiller

3 weeks ago

There are cases where it is zero or very close to zero but running over 5000 replications the average is different from zero (not statistically). I wanted to get the average value as close to zero as possible, which is the true value.

Solution

3 weeks ago

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to MetinBulus

3 weeks ago - last edited 3 weeks ago

But the average doesn't have to be zero, no matter how many runs you make (unless you can do an infinite number of runs).

The real test is as I described, that the values are not statistically different than zero, 95% of the time.

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to PaigeMiller

3 weeks ago

Thank you Page, I think your answer helped me realize what I might be doing wrong. I am forcing negative variance estimates to be zero, perhaps that is why the average is not zero.