08-09-2024
RyanDHS
Calcite | Level 5
Member since
08-07-2024
- 5 Posts
- 1 Likes Given
- 0 Solutions
- 0 Likes Received
-
Latest posts by RyanDHS
Subject Views Posted 1046 08-09-2024 12:54 PM 1198 08-08-2024 01:18 PM 1209 08-08-2024 01:13 PM 1229 08-08-2024 12:56 PM 573 08-07-2024 04:15 PM -
Activity Feed for RyanDHS
- Posted Re: PROC mixed level 2 variables as level 1? on Statistical Procedures. 08-09-2024 12:54 PM
- Liked Re: PROC mixed level 2 variables as level 1? for jiltao. 08-09-2024 12:52 PM
- Posted Re: PROC mixed level 2 variables as level 1? on Statistical Procedures. 08-08-2024 01:18 PM
- Posted Re: PROC mixed level 2 variables as level 1? on Statistical Procedures. 08-08-2024 01:13 PM
- Posted PROC mixed level 2 variables as level 1? on Statistical Procedures. 08-08-2024 12:56 PM
- Posted proc mixed Level 2 variables treated as Level 1 on SAS Procedures. 08-07-2024 04:15 PM
-
Posts I Liked
Subject Likes Author Latest Post 1
08-09-2024
12:54 PM
Hey, that worked! *furiously reads notes on ddfm=bw* Okay I'm not sure why this isn't the default but at least it makes sense why I haven't had this problem before because I am usually doing models with the repeated statement where it is the default. This all at least makes sense now, I really started questioning everything I knew about multi-level models. Thank you for your guidance!
... View more
08-08-2024
01:18 PM
Am I correct in concluding that the Den Degrees of Freedom being the same for what should be level 1 and level 2 variables implies that both are being treated as level 1?
... View more
08-08-2024
01:13 PM
Yes, that was rather silly of me. I still don't appear to be getting the correct degrees of freedom for my level 2 effect.
... View more
08-08-2024
12:56 PM
Moved from Programming board. I have data at the level of US Counties (level 1) nested within their respective State (level 2) and I have both predictors at the county level and the state level. My understanding was always that Proc Mixed determines the level of the variable in the model based on whether there is variability at each level. In this example, I have the population of the county (pop10) as a predictor and the way the state votes relative to others (CPVI), both ratio scales. My syntax is below: proc mixed data = sor covtest ; class STATE ; model SORgc = pop10 CPVI /s DDFM=sat ; random int / sub=STATE ; ods output SolutionR = Res2; run; The ODS output gives me: WARNING: Output 'SolutionR' was not created. Make sure that the output object name, label, or path is spelled correctly. Also, verify that the appropriate procedure options are used to produce the requested output object. For example, verify that the NOPRINT option is not used. because there are no level 2 residuals and the degrees of freedom suggest it is treating my level 2 variable CVPI as a level 1 predictor. I've attached the data file. I've checked that there is no variance in the variables at the state level (see second tab in excel sheet) and made sure everything is a number and everything I can possibly think of. SAS is doing the grouping right because it shows the number of subjects correctly (not all states are included). Am I missing something really obvious? The degrees of freedom for a level 2 predictor should be less than the number of level 2 groups, right? I'm not going insane?
... View more
08-07-2024
04:15 PM
I have data at the level of US Counties (level 1) nested within their respective State (level 2) and I have both predictors at the county level and the state level. My understanding was always that Proc Mixed determines the level of the variable in the model based on whether there is variability at each level. In this example, I have the population of the county (pop10) as a predictor and the way the state votes relative to others (CPVI), both ratio scales. My syntax is below: proc mixed data = sor covtest ; class STATE ; model SORgc = pop10 CPVI /s DDFM=sat ; random int / sub=STATE ; ods output SolutionR = Res2; run; The ODS output fails because there are no level 2 residuals and the degrees of freedom suggest it is treating my level 2 variable CVPI as a level 1 predictor. I've attached the data file. I've checked that there is no variance in the variables at the state level (see second tab in excel sheet) and made sure everything is a number and everything I can possibly think of. SAS is doing the grouping right because it shows the number of subjects correctly (not all states are included). Am I missing something really obvious?
... View more