I am able to create a list of selected variables that start with "ftj19a", but now I want to create a Custom Table of all these variables. How should I proceed?
SPSSINC SELECT VARIABLES MACRONAME="MAC"
/PROPERTIES PATTERN = "(ftj19a)" ...
Would you please help me understand why SPSS says "The first word in the line is not recognised as an SPSS statistics command" even though I have installed and activated the Hayes kalpha macro? I would appreciate if you can suggest possible ways on how I can fix this or any other...
I have details relating to over 700,000 customer contacts. Our customers may use more than one address (e.g. home and business) and more than one telephone number (e.g. mobile or landline). It is also possible that there may be more than one name (e.g. mis-spelling) recorded for a particular...
I am attempting to use the AREG command in SPSS to run a Cochrane-Orcutt transformation on multiple subjects at one time. My data file has about 80 participants. My syntax currently looks like this:
/AREG Subject1 with Time
The output of this syntax...
I'm a beginner in SPSS syntax/macro and i have a question for people that know how to use these tools.
In order to save some time i would like to create some macro to be able to do some redundant test on different set of variables, using different filters etc ...
Right now i can (with...
I have a multiple mediation model with 1 IV, 6 mediators, and 1 DV (all are continuous variables). I also have one covariate to control for.
I ran a mediation analysis using those variables (plus the covariate) using INDIRECT macro by Preacher & Hayes. Two of my partial mediations were...
I've been struggling with a do loop in SAS and would be grateful for any assistance. This is the data I have:
input Parameter $ COL1 $ COL2 $;
Intercept AGE DRINKPATTERN
DRINKPATTERN AGE DRINKPATTERN
DRINKPATTERN AGE DRINKPATTERN
I am hoping to get some advice about a possible macro or looping expression that may save me some time here.
I have 50 columns of data across 90,000 rows that stipulate product departments that each individual viewed during a specific web visit. Each column could take one of 72...
I found this interesting article from MayoClinic, where they talked about a macro that finds a cut point for a continuous variable with a time to event outcome. Does anyone know where I can find this macro? Is there a macro repository that might have this macro? It is not available on the...
Have a matrix command section embedded in a macro.
The matrix commands run OK when not within the macro.
But they are not executed when placed within a macro.
Normally matrix programs should be alright within macros...
I have a numeric variable, lets call it 'times'. I have a macro variable 'myTime' defined to be some value, lets say 200. I would like to extract the closest value in 'times' to 'myTime' as a new macro variable 'closestTime'.
Would anyone know how to modify the code below so it...
I am trying to create a macro (&varlist) using proc sql ---> then putting the variable into the array item. But I get the error "Too few variables defined for the dimension(s) specified for the array item"
What's wrong here? Any help would be greatly appreciated.
proc sql noprint...
I have a functioning macro that creates a list of datasets from a master file that is unique for each day. The datasets I create in the SAS macro therefore have the data added to them so they are easy to categorize.
I would like to export some of the datasets as I create during the...
I have a functioning macro running through daily datasets. The macro itself works as it should and I get the outputs I want.
I would however like for SAS to save the files it generates as OUTPUTAdate OUTPUTBdate etc.
I can do so using this: data&year&mon2&day2 and then substitute...
I have a group of 10 exposure variables and a group of 10 outcome variables. I would like to write a macro to regress each outcome variable on each exposure variable (a total of 100 regressions) using GEE with logistic regression, but I am unsure of how to code this. Any help would be...
When merging 2 tables on a common by-variable you run the risk of having a different length on this (or these) by variable(s). If this is the case, SAS will casually inform you with the following warning:
WARNING: Multiple lengths were specified for the BY variable mergevar by input data...
I need help with macro variable quoting.
I have a SAS macro variable that has a list of values separated by | as below. The values are gathered from a SAS Dataset.
Select Distinct Strip(Diseasename) into :Dlist Separated by '|' From Dis_List;
I'm a new member and I need your help!!!
I have the following macro
( lib, outfile, file,var, value=);
OPTIONS NOTES SOURCE SOURCE2 MPRINT MLOGIC MERROR ;
set data = &lib..&file;
but when I...
I want to make a string variable with a number of 0's (say 842 for example).
*Macro to make a string var of specified length;
%macro zerofill(strname, strlength);
length &strname $100.;
%do %while (&strtemp>0);
substr(&strname, &strtemp, 1)="0";