Wednesday
JackieJ_SAS
SAS Employee
Member since
08-09-2019
- 98 Posts
- 162 Likes Given
- 17 Solutions
- 76 Likes Received
About
I am a principal analytical training consultant in Global Academic Programs at SAS. In my role, I conduct SAS software training at academic campuses around the country and work with faculty and students to support efforts to develop the future analytics workforce.
-
Latest posts by JackieJ_SAS
Subject Views Posted 562 2 weeks ago 634 2 weeks ago 427 03-28-2025 09:16 AM 558 03-27-2025 11:05 AM 859 03-27-2025 07:57 AM 935 03-26-2025 04:53 PM 1034 03-25-2025 05:06 PM 1499 03-20-2025 08:22 AM 664 03-19-2025 07:47 AM 998 03-19-2025 07:46 AM -
Activity Feed for JackieJ_SAS
- Liked Re: Repeated measures model executes in MIXED but not in GLIMMIX for SteveDenham. a week ago
- Liked Re: Repeated measures model executes in MIXED but not in GLIMMIX for SteveDenham. 2 weeks ago
- Posted Re: Repeated measures model executes in MIXED but not in GLIMMIX on Statistical Procedures. 2 weeks ago
- Got a Like for Re: Repeated measures model executes in MIXED but not in GLIMMIX. 2 weeks ago
- Got a Like for Re: Repeated measures model executes in MIXED but not in GLIMMIX. 2 weeks ago
- Liked Re: Repeated measures model executes in MIXED but not in GLIMMIX for ballardw. 2 weeks ago
- Liked Re: Repeated measures model executes in MIXED but not in GLIMMIX for jiltao. 2 weeks ago
- Liked Re: Repeated measures model executes in MIXED but not in GLIMMIX for SteveDenham. 2 weeks ago
- Liked Re: Repeated measures model executes in MIXED but not in GLIMMIX for jiltao. 2 weeks ago
- Liked Re: Repeated measures model executes in MIXED but not in GLIMMIX for wateas. 2 weeks ago
- Posted Re: Repeated measures model executes in MIXED but not in GLIMMIX on Statistical Procedures. 2 weeks ago
- Got a Like for Re: Discrepancies between PROC CORR and PROC REG. 2 weeks ago
- Got a Like for Re: How to conduct Balancing test / joint F-statistic?. 03-31-2025 01:32 PM
- Got a Like for Re: PROC FOREST- Unable to run code. 03-31-2025 10:24 AM
- Liked Re: PROC FOREST- Unable to run code for eduardo_silva. 03-28-2025 03:01 PM
- Liked Re: How to conduct Balancing test / joint F-statistic? for Ksharp. 03-28-2025 09:18 AM
- Posted Re: Unable to see my older programs or data which was stored on SAS Studio, on SAS Software for Learning Community. 03-28-2025 09:16 AM
- Got a Like for Re: How to conduct Balancing test / joint F-statistic?. 03-27-2025 08:59 PM
- Got a Like for Re: How to conduct Balancing test / joint F-statistic?. 03-27-2025 11:26 AM
- Posted Re: How to conduct Balancing test / joint F-statistic? on Statistical Procedures. 03-27-2025 11:05 AM
-
Posts I Liked
Subject Likes Author Latest Post 1 1 2 3 2 -
My Liked Posts
Subject Likes Posted 2 2 weeks ago 1 03-27-2025 07:57 AM 5 03-27-2025 11:05 AM 3 03-19-2025 07:46 AM 3 03-18-2025 10:42 AM -
My Library Contributions
Subject Likes Author Latest Post 3 3 6 0 10
2 weeks ago
@SteveDenham, The overall simulation results are discussed in this paper:
https://pubmed.ncbi.nlm.nih.gov/26089186/
Unfortunately, I don't show the results for trying out different optimization methods from GLIMMIX and MIXED. We just summarize the best one. For our set cases --which were low number of independent observations with high numbers of repeated measures-- the best method turned out to be TECHNIQUE=DBLDOG. To be honest, I have no idea why that one worked best! Thank you for asking!
... View more
2 weeks ago
2 Likes
Hi, While something else might be going on, it is worthy to note that the default optimization methods are not identical in MIXED and GLIMMIX. MIXED uses Newton-Raphson with ridging (and you cannot change this). You can change the optimization method in GLIMMIX using the NLOPTIONS statement with TECHNIQUE option. From the documentation I see this comment about the default optimization method in GLIMMIX: The default optimization techniques are TECHNIQUE=NONE for noniterative estimation, TECHNIQUE=NEWRAP for singly iterative methods in GLMs, TECHNIQUE=NRRIDG for pseudo-likelihood estimation with binary data, and TECHNIQUE=QUANEW for other mixed models. Personally, I had a simulation study I once ran that had widely different convergence rates depending on which method I specified on the NLOPTIONS statement. MIXED was also a comparator in my study. In the end, for my cases (which admittedly were unusual), I saw poor convergence rates for MIXED, the default in GLIMMIX, and many of the NLOPTIONS techniques, but did find one of the GLIMMIX techniques that had very high convergence rates. The moral is- convergence in GLIMMIX can change a lot based on what option you specify on the NLOPTIONS statement.
... View more
03-28-2025
09:16 AM
Hi, Are you using SAS studio through SAS OnDemand for Academics (ODA)? If so, below is some text from the ODA FAQ. I recommend you email ODA support at sasoda@sas.com and ask about the status of your account. Does my account expire? Access to SAS OnDemand for Academics can expire after an extended period of inactivity. However, to reactivate your access to SAS OnDemand for Academics, visit welcome.oda.sas.com enter your SAS Profile credentials and accept the terms of the license and the terms of use and conditions. Does my data or content expire? If your account is not reactivated after an extended period of time, SAS OnDemand for Academics will deactivate your account and archive your content. After an additional period of inactivity the archived content will be removed from the SAS OnDemand for Academics systems. Archived accounts are subject to having content removed without notice and this is at the discretion of the SAS OnDemand for Academics Team. Per the license agreement, SAS has the right to remove any Content at any time.
... View more
03-27-2025
11:05 AM
5 Likes
To add to the comments of @sbxkoenk, my understanding of your problem is that the default F test provided by PROC GLM is computing the same test computed by your code. For example, here is the output from one of the examples in the PROC GLM documentation:
The test you want is in the columns labeled "F Value" and "Pr>F" in the upper right of the first table.
... View more
03-27-2025
07:57 AM
1 Like
Hi, Check out the documentation for the FOREST and HPFOREST procedures and make sure you have valid syntax for each of your statements. For example, you have this statement with the FOREST procedure:
TARGET Default_Flag / LEVEL=BINARY;
The only valid choices for the LEVEL= options are LEVEL=NOMINAL or LEVEL=INTERVAL. The error notes in the log can be hard to figure out, but this error is trying to tell you that LEVEL=BINARY isn't valid syntax:
ERROR 22-322: Syntax error, expecting one of the following: INTERVAL, NOMINAL.
... View more
03-26-2025
04:53 PM
Hello @JLF5806! The syntax of the both the SUBSTR and SUBSTRN functions is:
SUBSTR (string, start <,length>)
In both cases, the function reads the string left to right, starting at the position specified by start and returning a string of the specified length. The two functions differ in how they handle zero or negative start and length values.
Your second example of SUBSTR("ABCDE", 1, 2) specifies a starting position of 1 and a length of 2, so the function starts at the letter "A" and returns two characters, resulting in the string "AB". Similarly, your first example of SUBSTRN("ABCDE", -1, 4) specifies a starting position of -1 and a length of 4. When the starting position is negative or zero, SUBSTRN returns a string that starts at the first position (here the letter "A") and adjusts the length of the string returned to account for the start value. If the starting position is 0, SAS subtracts 1 off the length. If the starting position is -1, SAS subtracts 2 off the length, etc. For a starting position of -1 and length of 4, think of it, for example, that you count -1, 0, 1, 2, but SAS only returns the characters starting at position 1, resulting in the string "AB". Check out Example 1- Manipulating Strings with the SUBSTRN Function- in the SUBSTRN documentation for another example.
... View more
03-25-2025
05:06 PM
3 Likes
Watch this Ask the Expert session to learn more tips and tricks for cleaning data using SAS programming.
Watch the webinar
You will learn how to use SAS character functions to:
Extract and count substrings.
Search for strings.
Concatenate strings.
Remove characters from strings.
If you missed earlier sessions in this series, watch part 1 and part 2 on demand.
The questions from the Q&A segment held at the end of the webinar are listed below and the slides from the webinar are attached.
Q&A
Survey systems such as REDCAP frequently assign a length of $500 to incoming character variables. Every pull from the data base (sometimes weekly) results in hundreds of length $500 variables. Is there any way to check on the fly if that length is truly needed short of recreating the length / format / input statements?
My memory of REDCAP is that it can output both Excel files and SAS files. One suggestion could be to output to an Excel file instead of a SAS file, then read in the Excel file with PROC IMPORT. You want to specify DBMS=XLSX on the PROC IMPORT statement and specify an additional statement of GUESSINGROWS=max. The latter tells SAS to read through all the data to determine the proper variable length. If this makes your program run too slowly, you could specify a smaller number of rows to scan. The SAS Excel import is pretty good at figuring out the max length needed for text variables when using GUESSINGROWS.
If there is nothing you can do to change your existing data pull, there may still be value in creating another dataset with appropriate lengths. In this case, you would need to manually specify the lengths of variables using a LENGTH statement.
You could figure out the lengths to set by using this code extended to your number of variables:
proc sql;
select max(length(textvar1)),
max(length(textvar2)),
max(length(textvar3))
from dataname;
quit;
Doesn’t index do the same thing as FIND?
The FIND, FINDC, and FINDW functions do the same thing as the INDEX, INDEXC, and INDEXW functions, respectively, but have some additional functionality. For that reason, I covered only the FIND functions in the webinar.
Check out the documentation for the FIND and INDEX functions. Both have required arguments of the string to search and the substring to find, but the FIND function additionally allows specification of the start position and modifiers.
Is there a way to search right to left using FIND, but where it will start from the end of the string, not the absolute value of the start?
Yes. To do this, specify a start value that is greater than the maximum length of your string, say -9999 or something like that.
I don't understand FINDW. It does not catch the substring in the first example, while it works in the 2nd example:
data _null_;
some2="some ";
some1="some another";
findit=findw(some1, some2);
putlog "WARNING: " findit=;
some1="some ";
findit=findw(some1, some2);
putlog "WARNING: " findit=;
run;
The FINDW function searches for words within a string, where words are separated by delimiters. SAS does not consider the delimiters as parts of the words in a string. So, for example, “some another” is the word “some”, then a delimiter of a space, then the word “another”. The words “some “ (space after “some”) or “ another” (space before “another”) would not be found, since the one space is the delimiter separating words.
A word can contain delimiters, though, and repeated delimiters can be considered part of a word on either side of them.
For example, “some another” (two spaces in between “some” and “another”) could be the words “some " (space after “some”) and “another” or the words “some” and “ another” (space before “another”).
In order to find your string SOME2 (“some” followed by one space), you would need to search within a string that has two consecutive spaces in a row or has a space followed by another delimiter.
Would -1 and -99 do the same thing? Start at the end of a string?
In general, no. SAS starts at the absolute value of the start value. Then, if the start value is positive SAS reads left to right, and if negative, SAS reads right to left. Using a start value of -1 tells SAS to start at the first character and move left. In the example, the string is shorter than 99 characters, so using a start value of -99 tells SAS to start at the end of the string and move left.
When cleaning addresses, is it more efficient to use the char functions you presented today or the regular expressions that you presented in part 2?
Great question. The perl regular expressions from part 2 will allow you to find much more complicated patterns than the character functions in this part 3. In my opinion, you sacrifice some readability, though. I recommend you look at this paper that compares perl regular expressions to several character functions we covered in part 3:
Express Yourself! Regular Expressions vs SAS Text String Functions
Is there a function that counts the words in a string?
Yes. The COUNTW function counts the number of words in a string. This is a function I would have loved to cover if we had more time.
Recommended Resources
SAS® Programming 2: Data Manipulation Techniques
SAS Functions by Example on RedShelf
SAS Functions by Example on Amazon
Ron Cody SAS Author Page
SAS OnDemand for Academics Software for Students, Educators, and Independent Learners
Please see additional resources in the attached slide deck.
Want more tips? Be sure to subscribe to the Ask the Expert board to receive follow up Q&A, slides and recordings from other SAS Ask the Expert webinars.
... View more
Labels:
03-20-2025
08:22 AM
One additional thought. You mentioned you are using Firefox as a browser. Try using a different browser (Google Chrome, Microsoft Edge) and also try updating your Firefox browser to the latest version.
... View more
03-19-2025
07:47 AM
Hooray! Glad it worked! 🙂
... View more
03-19-2025
07:46 AM
3 Likes
Hi, The ranks are not integers, because of the ways tied values are being handled. When you have more than one observation with the same data value, the default is for PROC RANK to compute the mean of the ranks. Try out different values of the TIES= option on the PROC RANK statement, and see which one gets what you want: https://go.documentation.sas.com/doc/en/pgmsascdc/v_060/proc/p16s2o8e4bnqrin1phywxdaxqba7.htm#n128utp0vvfmlrn1lr0nbu0kf6nu Since it looks like this is data where a higher number of goals is better, also consider using the DESCENDING option.
... View more
03-18-2025
05:49 PM
By the way, this is the AI summary for this issue I get from the internet. Maybe it helps.
If your web page prints blank after the first page, check your printer settings, ensure there's enough ink/toner, clean the print head, update or reinstall printer drivers, and try restarting both your printer and computer .
Here's a more detailed breakdown of potential causes and solutions:
1. Printer Issues:
Low Ink/Toner: Make sure your ink or toner cartridges are not empty or low.
Clogged Print Head: A clogged print head can cause patchy or blank printing. Clean the print head according to your printer's instructions.
Printer Settings: Check your printer settings (paper type, orientation, margins, etc.) to ensure they are correctly configured for the print job.
Printer Driver Issues: Outdated or corrupted printer drivers can cause printing problems. Update or reinstall your printer drivers from the manufacturer's website.
Restart Printer and Computer: A simple restart can resolve temporary glitches that may be causing the issue.
Check for Paper Jam: Ensure there are no paper jams that could be causing the printer to stop.
Check for Disconnected Cartridge: Even if the cartridge looks full, it might have become disconnected.
2. Web Browser Issues:
Hardware Acceleration:
In some browsers, disabling hardware acceleration can help with printing issues. For example, in Chrome, go to Settings > Advanced > System, and disable "Use hardware acceleration when available".
Reset Browser Settings:
Resetting your browser to its default settings can resolve some printing problems.
Check for Browser Extensions:
Some browser extensions can interfere with printing. Try disabling extensions to see if that resolves the issue.
3. Network Issues (if applicable):
Wired Connection: If you're using a wireless connection, try using a wired connection to see if that resolves the issue.
Printer Network Settings: Ensure your printer is correctly configured for your network.
... View more
03-18-2025
05:47 PM
Hello, I tried to print a multi-page long program and had no issues. Is it possible that it's something with your printer setup, specifically the paper size? When I click the print icon, the code opens in an HTML tab, then another window opens where I select the printer. Is this all happening for you? Since the code opens in a separate HTML tab, you are just printing a web page at that point. Can you print the content of other long web pages outside of ODA? Perhaps you could try printing the output to a PDF file, then, outside of ODA, you could print the PDF file.
... View more
03-18-2025
10:42 AM
3 Likes
Hi, Was the ncvpssas0 folder shared with you by your instructor? In other words- is it a folder that you do not own?
If so, the folder is read only, so you cannot write to it. You are getting errors because you are trying to write to the folder.
I suggest you make a personal copy of the folder shared by your instructor. You will be able to write to this folder. To do this, right click on your instructor's folder, then select "Copy to". In the Copy To window, highlight Files (Home) and click Copy. This creates a copy of the selected folder in the Files (Home) root folder.
... View more
03-05-2025
10:01 AM
A couple of other thoughts (you never know)
In Edge- try clearing your cookies and cache and any SAS related saved logins.
Make sure to manually type the login and password as opposed to using a saved login.
Make sure to view the password that is entered to ensure you are typing what you think you are typing
Maybe there is a problem with your home keyboard? Are any keys sticking?
... View more
03-05-2025
07:30 AM
What happens when you try to login at home? Blank screen? Error message? A screen shot would be helpful. SAS OnDemand for Academics does have browser requirements. Perhaps your Edge browser has not been updated in a while. One thing you could try is installing the latest version of Firefox or Chrome browser, then see if one of those works.
... View more