I am trying to run a Cox's proportional hazards regression with time-varying covariates.
I have survival data on 360,000 subjects with anything from 1 to 60+ readings of a continuous variable that I want to incorporate into the model (time-varying covariate). As well as some baseline...
Have you tried using a GOTO statement.
Here is a little counting macro, I have since changed it to much simpler code which does the same thing I wanted, but this may work for you.
Essentially it scans a text string &CorVars and increments &NumCorVars by 1, when &CorVars is equal to nothing it...
You need to go in and edit the stat.GLM.Estimates template.
This can be found by opening at the results window, then selecting 'templates' from the 'view' menu, and navigating your way through the sashelp.tmplmst to get to that particular template.
Then you can copy the template into the editor...
I'm running the following GLM code:
proc glm data=shbg;
model &modelDep = &BMImodelInd / solution clparm;
run;
And in order to format the number of decimal places in the output of the Parameter Estimates I use the following code:
proc template;
edit Common.ParameterEstimates.Estimate...
I have a problem when trying to square the &B macro variable in the following code:
data parmscalcs;
array _YSSurv{5};
merge parms parmsmatrix;
retain B;
B=B;
if Level=1 then do;
B= 9 * &CumSurvFinal * (log(_YSSurv{1})+
log(_YSSurv{2}) + log(_YSSurv{3}) +...
Need a little help with the following code:
%macro RunModel;
proc greplay igout=work.gseg tc=tempcat nofs;
delete _all_; quit; *Delete all previous graphs;
%do i = 1 %to 3 %by 1;
%let modelDep=%scan(&Dependent,&i);
goptions device=gif hsize=6 cm vsize=4 cm display...
Thanks ChrisW75,
the colon solved the problem, don't need the upcase() command.
The following works.
data CleanM;
set Clean;
if pathol ne: "Burnie" then delete;
run;
Thanks again,
Petr
Nick and Klaz,
Thanks for the prompt replies.
Unfortunately neither the trim nor upcase functions worked to solve the problem.
I have found another way using a different variable (numeric) to do the subsetting.
Thanks again.
Petr
Having a problem with the data step.
The following code works on my windows machine running SAS 9.1:
data CleanM;
set Clean;
if pathol ne "Burnie" then delete;
run;
But will not work on a Unix machine running SAS 9.1.
The only difference is that the windows machine has a random subsample...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.