swh:1:snp:e94096527620720ab530102fd039e636a91a990c
Raw File
Tip revision: c9af23eaea43a10ec3a4129404c6df71182ea949 authored by Samrachana Adhikari on 18 June 2014, 00:00:00 UTC
version 0.4
Tip revision: c9af23e
HLSM.school.advice.R
#library(HLSM)
#data(schools-advice-data)

message ("Predictors: Edge variables")
print (ps.edge.vars.mat[[1]][1:10,1:10,])

message ("Outcome: Advice seeking")
print (ps.advice.mat[[1]][1:10,1:10])

#Random Regression Coefficients#
priors = NULL
tune = NULL
initialVals = NULL
niter = 10

random.fit = HLSM(X = ps.edge.vars.mat,Y = ps.advice.mat,
	initialVals = initialVals,priors = priors,
	tune = tune,tuneIn = FALSE,dd = 2,niter = niter,
	intervention = 0)


summary(random.fit)
names(random.fit)

fixed.fit = HLSMfixedEF(X = ps.edge.vars.mat,Y = ps.advice.mat,
	initialVals = initialVals,priors = priors,
	tune = tune,tuneIn = FALSE,dd = 2,niter = niter,
	intervention = 0)
summary(fixed.fit)
names(fixed.fit)

back to top