HLM: What happens if I enter level2 variables at level 1?

The goal of this exercise is to find out what happens if I intentionally use a level2 variable at level 1 in HLM. I found that the coefficients and standard errors remain about the same. The parameter that differed was just the degree of freedom, which was consistent with my expectation.

Using my old […]

PROG GLM syntax — contrasting groups using LSMEANS

proc glimmix data=kaz2.Year2AnalysisSample; class SCHOOL_NAME grade_level race_cate; model &z_post = treat grade_level /solution ddfm=kr dist=normal link=identity s ; random SCHOOL_NAME; covtest /wald; lsmeans grade_level / diff; run;

Cronbach Coefficient Alpha

SAS's proc cor procedure produces two types of cronbach coefficient alpha: raw value and standardized value.

proc corr alpha data=dataname_here; var item1 item2 item3 item4 item5 item6 item7; run;

The result table includes two values:

Cronbach Coefficient Alpha

Variables Alpha ——————————– Raw 0.74 Standardized 0.75

Standardized version is based on standardized values of all variables […]

How to edit a PROC GLIMMIX syntax into a PROC MIXED syntax

I encountered a situation where somehow PROC GLIMMIX can't produce results while PROC MIXED can. In this WORD document, I showed you how I edited the PROC GLIMMIX syntax to be a PROC MIXED syntax. Please ignore my macro %w.

https://drive.google.com/open?id=0B7AoA5fyqX_sVXQ1YzRlSlFlaW8

PROC GLIMMIX error messages

While running PROC GLIMMIX with a large dataset with categorical variables explicitly treated as CLASS variables AND with weight, I got the following error message:

WARNING: Obtaining minimum variance quadratic unbiased estimates as starting values for the covariance parameters failed.

The weight and the use of categorical variables were the cause of the problem as […]

Logistic regression result and odds ratio

Mathematically, you only need the coefficient for the predictor to derive an odds ratio (you don't need the intercept value).

oddsratio=exp(coefficient_size)

 

 

Doing HLM and Time-series analysis at the same time using GLIMMIX

HLM (multilevel models) and econometric analyses (e.g., time series analysis, ARIMA, etc.) are treated as different approaches (the goal of which is to deal with data dependency problem), they can be implemented in the same model via. SAS PROC GLIMMIX. However, I believe doing this is computationally demanding and models may not converge.

http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_glimmix_sect020.htm

For […]

Kenward-Roger Degrees of Freedom (SAS GLIMMIX)

I will edit this essay later.

Imagine I have an HLM model where level-1 are students and level-2 are schools. I can enter teacher-level variables, but people who are used to HLM software by SSI will wonder how the use of teacher-level variables is possible without making the model 3-level models (level1 students, level2 teachers, […]

Proc mixed and Proc glimmix produce identical results

PROC MIXED and PROC GLIMMIX produce identical results for the following linear model settings.

proc glimmix data=kaz.asdf; where IMPACT_ANALYSIS=1; class school; model y = x1 x2 x3 /solution ddfm=kr dist=normal link=identity s ; random school; run;

proc mixed data=kaz.asdf; where IMPACT_ANALYSIS=1; class school; model y = x1 x2 x3 /solution s ddfm=kr; random school; run;

How to derive subgroup adjusted outcome averages and conduct pairwise stat-test

When you run a statistical interaction model (e.g., Y=TREATMENT + GENDER + TREATMENT*GENDER), you also want to run a mathematically equivalent model: Y= T_MALE + C_MALE + T_FEMALE + C_FEMALE.

SUBGROUP defines the four groups below.

This is for linear model (HLM because I have the random statement).

proc glimmix data=asdf3 namelen=32; class CAMPUSID […]