14.09.2015 Views

Matvec Users’ Guide

Matvec Users' Guide

Matvec Users' Guide

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

76 CHAPTER 11. GENERALIZED LINEAR MIXED MODEL ANALYSES<br />

.<br />

B 13 1<br />

B 17 1<br />

B 20 1<br />

The third column contains a code to indicate if the data are right censored (1:uncensored and 0:censored).<br />

Because none of the records were censored, all the censor codes are one in this example. Like the threshold<br />

model, the Weibull is a multivariate generalized linear model. Model equations will be needed for both a<br />

risk factor η and a rate parameter ρ. Typically the rate parameter, which describes the shape of the survival<br />

function, is assumed to be the same for everyone in the population and only includes an intercept term. The<br />

risk factor will include both an intercept and an effect for drug therapy.<br />

The Weibull survival model for this example can be obtained from:<br />

D=Data();<br />

D.input("cancer.dat","therapy $ week censor");<br />

M=Model();<br />

M.equation("week=intercept therapy,week=intercept");<br />

M.link("weibull",0)<br />

M.param(0,"week","censor",.5);<br />

M.init(-1,1);<br />

M.fitdata(D);<br />

M.glim();<br />

M.save("cancer.out");<br />

The M.param() is used to specify four additional model fitting parameters needed by the weibull link<br />

function. The first parameter is 1 if the rate parameter is to remain fixed and 0 if the rate parameter is to<br />

be estimated. The second parameter, is the time variable in the data set. The third parameter, is the censor<br />

code variable in the data set. The fourth parameter is the time to recode any zero times to in the data set.<br />

The M.init() is used to specify initial values for both the risk factor and the rate parameter. If M.init()<br />

was not included the initial values for the risk factor and rate factor would be zero.<br />

A Wald test for testing for a therapy effect is generated by:<br />

"\n Therapy effect\n"<br />

M.contrast("therapy",[1,0,-1,0]);<br />

To test the hypothesis that the rate parameter was 1 is generated by:<br />

"\n Rate parameter\n"<br />

M.contrast("intercept",[0 1],[1]);<br />

The output from the program is<br />

Weibull Link Function<br />

Parameters: FixRho (scalar), Time variable (string),<br />

Censor Variable (string) 1=uncen 0=cen,<br />

Zero Value (scalar)<br />

Terms: Eta, Rho<br />

Therapy effect<br />

RESULTS FROM CONTRAST(S)<br />

----------------------------------------------------------<br />

Contrast MME_addr K_coef Raw_data_code<br />

---------------------------------------------<br />

1 3 1 week:therapy:A

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!