svh Tracker
https://communities.sas.com/kntur85557/tracker
svh TrackerMon, 22 Apr 2024 00:18:27 GMT2024-04-22T00:18:27ZRe: Testing simultaneous effect in PROC MIXED
https://communities.sas.com/t5/Statistical-Procedures/Testing-simultaneous-effect-in-PROC-MIXED/m-p/918819#M45610
So then maybe MIXED will not supply what is needed as I think the Type I,<BR />II, and III tests are not able to accommodate tests of "simultaneous"<BR />effects of two or more variables.<BR />Mon, 04 Mar 2024 13:07:49 GMThttps://communities.sas.com/t5/Statistical-Procedures/Testing-simultaneous-effect-in-PROC-MIXED/m-p/918819#M45610svh2024-03-04T13:07:49ZRe: Testing simultaneous effect in PROC MIXED
https://communities.sas.com/t5/Statistical-Procedures/Testing-simultaneous-effect-in-PROC-MIXED/m-p/918735#M45607
The Type III tests of fixed effects do, in fact, test the association<BR />of *different<BR />*variables with the dependent variable. If you wanted to test differences<BR />between the levels of the *same* categorical variable, you would use a<BR />CONTRAST or ESTIMATE statement.<BR />Sun, 03 Mar 2024 13:39:49 GMThttps://communities.sas.com/t5/Statistical-Procedures/Testing-simultaneous-effect-in-PROC-MIXED/m-p/918735#M45607svh2024-03-03T13:39:49ZRe: Testing simultaneous effect in PROC MIXED
https://communities.sas.com/t5/Statistical-Procedures/Testing-simultaneous-effect-in-PROC-MIXED/m-p/918524#M45587
<P>The test of their effects would be in the "Type III Tests of Fixed Effects" that is part of the standard output of the MIXED procedure. The test of each covariate is after all of the other predictors are included in the model. That is where you'd find your test of B1=B2=0.</P>Fri, 01 Mar 2024 01:22:26 GMThttps://communities.sas.com/t5/Statistical-Procedures/Testing-simultaneous-effect-in-PROC-MIXED/m-p/918524#M45587svh2024-03-01T01:22:26ZRe: How to get 95% Confidence for Hazard Ratio in Competing Risk Analysis
https://communities.sas.com/t5/SAS-Procedures/How-to-get-95-Confidence-for-Hazard-Ratio-in-Competing-Risk/m-p/915110#M83305
<P>Have you tried the HAZARDRATIO statement with the CL= option?</P>
<P> </P>
<P><A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_phreg_syntax13.htm" target="_blank">https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_phreg_syntax13.htm</A></P>Thu, 08 Feb 2024 16:14:32 GMThttps://communities.sas.com/t5/SAS-Procedures/How-to-get-95-Confidence-for-Hazard-Ratio-in-Competing-Risk/m-p/915110#M83305svh2024-02-08T16:14:32ZRe: How to get rid the box in legends in proc sgplot
https://communities.sas.com/t5/SAS-Programming/How-to-get-rid-the-box-in-legends-in-proc-sgplot/m-p/903730#M357081
<P>Add noborder to your legend statement. </P>Fri, 17 Nov 2023 20:49:44 GMThttps://communities.sas.com/t5/SAS-Programming/How-to-get-rid-the-box-in-legends-in-proc-sgplot/m-p/903730#M357081svh2023-11-17T20:49:44ZRe: Creating a view in PROC SQL with a LEFT JOIN onto multiple tables
https://communities.sas.com/t5/SAS-Procedures/Creating-a-view-in-PROC-SQL-with-a-LEFT-JOIN-onto-multiple/m-p/896166#M82956
<P>You could be right, but I need a SQL view nonetheless. Turns out this is a case for a FULL JOIN. It's not pretty but it works. </P>
<P> </P>
<PRE><CODE class=" language-sas">proc sql;
create view merged_full_sum as
select distinct a.x, a.y, a.z,
sum(case when b.key1 = 8 then 1 else 0 end) as L8,
sum(case when b.key1 = 7 then 1 else 0 end) as L7,
sum(case when b.key1 = 9 then 1 else 0 end) as L9,
sum(case when c.key2 = 8 then 1 else 0 end) as M8,
sum(case when c.key2 = 7 then 1 else 0 end) as M7,
sum(case when c.key2 = 4 then 1 else 0 end) as M4,
sum(case when c.key2 = 9 then 1 else 0 end) as M9,
sum(case when c.key2 = 3 then 1 else 0 end) as M3,
(case when calculated L8 > 1 then 1 else calculated L8 end) as L8,
(case when calculated L7 > 1 then 1 else calculated L7 end) as L7_new,
(case when calculated L9 > 1 then 1 else calculated L9 end) as L9_new,
(case when calculated M8 > 1 then 1 else calculated M8 end) as M8_new,
(case when calculated M7 > 1 then 1 else calculated M7 end) as M7_new,
(case when calculated M4 > 1 then 1 else calculated M4 end) as M4_new,
(case when calculated M9 > 1 then 1 else calculated M9 end) as M9_new,
(case when calculated M3 > 1 then 1 else calculated M3 end) as M3_new
from TableA a
full join Long b on (a.x = b.ID)
full join Long2 c on (a.x = c.ID)
group by a.x;
quit;</CODE></PRE>Wed, 27 Sep 2023 21:37:18 GMThttps://communities.sas.com/t5/SAS-Procedures/Creating-a-view-in-PROC-SQL-with-a-LEFT-JOIN-onto-multiple/m-p/896166#M82956svh2023-09-27T21:37:18ZCreating a view in PROC SQL with a LEFT JOIN onto multiple tables
https://communities.sas.com/t5/SAS-Procedures/Creating-a-view-in-PROC-SQL-with-a-LEFT-JOIN-onto-multiple/m-p/896113#M82954
<P>I have a situation in which I have one table with one row per primary key and I need to left join onto multiple tables that can have more than one row per primary key. I would like the resulting table (a view, actually) to be one row per value of the primary key, which means the PROC SQL procedure needs to derive new variables to transpose the "long" tables to wide data sets. In this example, I do not get the output I'm looking for. I've looked in the documentation and don't see a simple solution. I need a workable solution in PROC SQL because I am building SQL views off tables in a MySQL database. This code results in the wrong output table, so I need a modification in the statement somewhere.</P>
<P> </P>
<PRE><CODE class=" language-sas">data TableA;
input x $ y z;
cards;
A01 55 66
A02 11 22
A03 44 88
;
run;
data Long;
input ID $ Key1;
cards;
A01 8
A01 7
A03 9
A03 3
;
run;
data Long2;
input ID $ Key2;
cards;
A01 8
A01 7
A01 4
A03 9
A03 3
;
run;
proc sql;
create view merged as
select distinct a.x, a.y, a.z,
case when b.key1 = 8 then 1 else 0 end as L8,
case when b.key1 = 7 then 1 else 0 end as L7,
case when b.key1 = 9 then 1 else 0 end as L9,
case when c.key2 = 8 then 1 else 0 end as M8,
case when c.key2 = 7 then 1 else 0 end as M7,
case when c.key2 = 4 then 1 else 0 end as M4,
case when c.key2 = 9 then 1 else 0 end as M9,
case when c.key2 = 3 then 1 else 0 end as M3
from TableA a
left join Long b on (a.x = b.ID)
left join Long2 c on (a.x = c.ID)
group by a.x;
quit;
</CODE></PRE>Wed, 27 Sep 2023 17:57:19 GMThttps://communities.sas.com/t5/SAS-Procedures/Creating-a-view-in-PROC-SQL-with-a-LEFT-JOIN-onto-multiple/m-p/896113#M82954svh2023-09-27T17:57:19ZRe: How to replicate functionalities from vbar with barchart
https://communities.sas.com/t5/Graphics-Programming/How-to-replicate-functionalities-from-vbar-with-barchart/m-p/883110#M23927
Have you tried using the statement that helps find code for SAS Graph Template that can replicate something SGPLOT does?<BR /><A href="https://sasnrd.com/sas-tmplout-option/" target="_blank">https://sasnrd.com/sas-tmplout-option/</A>Fri, 30 Jun 2023 14:55:39 GMThttps://communities.sas.com/t5/Graphics-Programming/How-to-replicate-functionalities-from-vbar-with-barchart/m-p/883110#M23927svh2023-06-30T14:55:39ZRe: How do I search for a string of text with the "@" symbol? some cells contain email add
https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882488#M39131
My code was just to help with thinking about the functions that could work. Did you try running something like:<BR /><BR />data want;<BR />set have;<BR />end= scan(columnB,2, "@");<BR />start = scan(columnB,1, "@");<BR />email = catx('@', scan(start, -1, ' '), scan(end, 1, ' '));<BR /><BR />Mon, 26 Jun 2023 17:23:13 GMThttps://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882488#M39131svh2023-06-26T17:23:13ZRe: How do I search for a string of text with the "@" symbol? some cells contain email add
https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882475#M39128
<P>This is a back-of-the-napkin solution that assumes that @ symbols are only in email addresses:</P>
<P> </P>
<P>data need;<BR />email = "blah blah henry_fifth@gmail.com blah"; /* example of a field with text and an email address*/<BR />end= scan(email,2, "@");<BR />start = scan(email,1, "@");<BR />email_new = catx('@', scan(start, -1, ' '), scan(end, 1, ' '));<BR />run;</P>Mon, 26 Jun 2023 16:29:39 GMThttps://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882475#M39128svh2023-06-26T16:29:39ZRe: SAS Base code in VS Code using SAS OnDemand for Academics
https://communities.sas.com/t5/Administration-and-Deployment/SAS-Base-code-in-VS-Code-using-SAS-OnDemand-for-Academics/m-p/882156#M26822
<P>I thought that this functionality was only in SAS Viya. Without SAS Viya, you can only write SAS code in VS Code without submitting it to a SAS session.</P>
<P> </P>
<P> </P>Fri, 23 Jun 2023 15:15:54 GMThttps://communities.sas.com/t5/Administration-and-Deployment/SAS-Base-code-in-VS-Code-using-SAS-OnDemand-for-Academics/m-p/882156#M26822svh2023-06-23T15:15:54ZRe: How to include macro variable in an email
https://communities.sas.com/t5/SAS-Programming/How-to-include-macro-variable-in-an-email/m-p/875077#M345751
Just a quick guess...but should it be %put since you are evaluating the macro variable in your email message?<BR /><BR />/*revised line at bottom of your code*/<BR />%put &empty_tables;<BR />Wed, 10 May 2023 20:26:31 GMThttps://communities.sas.com/t5/SAS-Programming/How-to-include-macro-variable-in-an-email/m-p/875077#M345751svh2023-05-10T20:26:31ZRe: Adding ≥, ≤ to a footnote
https://communities.sas.com/t5/SAS-Programming/Adding-to-a-footnote/m-p/873906#M345250
<P>It seems SAS Studio handles this differently; when I just use the number, it prints.</P><PRE><CODE class="">ods escapechar='^';
proc report data=sashelp.cars;
column make mpg_city;
define make / group ;
define mpg_city / analysis mean ;
footnote1 j=l font=arial "abbreviation ^{unicode 2264}";
run;</CODE></PRE>Thu, 04 May 2023 15:38:38 GMThttps://communities.sas.com/t5/SAS-Programming/Adding-to-a-footnote/m-p/873906#M345250svh2023-05-04T15:38:38ZRe: Adding ≥, ≤ to a footnote
https://communities.sas.com/t5/SAS-Programming/Adding-to-a-footnote/m-p/873641#M345199
<P>Hmmm, this seems to work for me in SAS 9.4. Do you have any more information about where it's not working?</P><P> </P><PRE><CODE class="">ods escapechar='/';
proc report data=sashelp.cars;
column make mpg_city;
define make / group ;
define mpg_city / analysis mean ;
footnote1 j=l font=arial "abbreviation /{unicode '2264'x\}";
run;</CODE></PRE>Wed, 03 May 2023 14:03:24 GMThttps://communities.sas.com/t5/SAS-Programming/Adding-to-a-footnote/m-p/873641#M345199svh2023-05-03T14:03:24ZRe: Merge 3 datasets
https://communities.sas.com/t5/New-SAS-User/Merge-3-datasets/m-p/870553#M38536
Are you trying to "stack" (or concatenate) the data sets? If so, in Method 2, the "MERGE" statement can be replaced with a "SET" statement and you can remove the "BY" statement completely.<BR /><BR />Currently, in Method 2, you are going to perform a join in which observations with common values for "reference_number" will be combined (which is why you are seeing fewer than 3 million-ish observations in your result).Wed, 19 Apr 2023 14:03:21 GMThttps://communities.sas.com/t5/New-SAS-User/Merge-3-datasets/m-p/870553#M38536svh2023-04-19T14:03:21ZRe: SAS Graphs
https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/868949#M23645
Have you tried the LOCATION=INSIDE option statement in the DISCRETELEGEND statement?<BR /><BR /><A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/grstatgraph/p0nebkqa1obtgxn13ska62up7wwh.htm#n18ugxvre36a5vn1uqt5zkrumlkwb" target="_blank">https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/grstatgraph/p0nebkqa1obtgxn13ska62up7wwh.htm#n18ugxvre36a5vn1uqt5zkrumlkwb</A>Mon, 10 Apr 2023 21:01:23 GMThttps://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/868949#M23645svh2023-04-10T21:01:23ZRe: SAS EG not supporting UTF-8 in code?
https://communities.sas.com/t5/SAS-Programming/SAS-EG-not-supporting-UTF-8-in-code/m-p/867263#M342512
<P>I see the issue, and I don't know enough about changing encoding and if that would work.</P><P> </P><P>I usually embed special characters in my formats with this kind of syntax. E.g., in this case the unicode value for a LE sign is 2264</P><P> </P><PRE><CODE class="">proc format;
value quantity 1 = 'Never'
2 = "1(*ESC*){unicode '2264'x}5 visits"
3 = "6(*ESC*){unicode '2264'x}10 visits"
;</CODE></PRE>Thu, 30 Mar 2023 14:47:43 GMThttps://communities.sas.com/t5/SAS-Programming/SAS-EG-not-supporting-UTF-8-in-code/m-p/867263#M342512svh2023-03-30T14:47:43ZHow to differentiate the fit of the measurement model from regression effects in PROC CALIS
https://communities.sas.com/t5/Statistical-Procedures/How-to-differentiate-the-fit-of-the-measurement-model-from/m-p/866603#M42828
<P>I am using the LINEQS statement in PROC CALIS to estimate a structural model in which part of the model looks like the diagram in the attachment. In short, our conceptual framework suggests that x1, x2, and x3 are manifest variables for the latent variable Y1. Y1, in turn, has a direct effect on a different latent variable (Y2) whose manifest variables are not shown. My question is that when I fit a structural model in PROC CALIS, I do not know how to differentiate the standardized effects of the measurement model from the regression effects. All of the effects are summarized in the table in the output titled "Standardized Effects in Linear Equations", but how do I know if my model is not including Y2 as a manifest variable for of Y1? I cannot seem to find this addressed in the documentation.</P><P> </P><PRE><CODE class="">/* Example of PROC CALIS code */
lineqs
x1 = L1 Y1 + E1,
x2 = L2 Y1+ E2,
x3 = L3 Y1 + E3,
Y2 = B1 Y1 + D1,</CODE></PRE><DIV class=""><DIV><DIV align="center"> </DIV></DIV></DIV>Mon, 27 Mar 2023 18:41:02 GMThttps://communities.sas.com/t5/Statistical-Procedures/How-to-differentiate-the-fit-of-the-measurement-model-from/m-p/866603#M42828svh2023-03-27T18:41:02ZRe: Finding the duplicate values between two datasets
https://communities.sas.com/t5/New-SAS-User/Finding-the-duplicate-values-between-two-datasets/m-p/866087#M38284
Using an inner join in PROC SQL should work:<BR />proc sql;<BR />create table duplicate_reference_number as<BR />select a.REFERENCE_NUMBER<BR />from sep_release a INNER JOIN oct_release b<BR />on a.REFERENCE_NUMBER = b.REFERENCE_NUMBER;<BR />quit;<BR />Fri, 24 Mar 2023 11:40:27 GMThttps://communities.sas.com/t5/New-SAS-User/Finding-the-duplicate-values-between-two-datasets/m-p/866087#M38284svh2023-03-24T11:40:27ZRe: a code to mark to fist obs by group that answers a condition
https://communities.sas.com/t5/SAS-Programming/a-code-to-mark-to-fist-obs-by-group-that-answers-a-condition/m-p/865987#M341989
Spoiler alert: It does work.Thu, 23 Mar 2023 17:35:37 GMThttps://communities.sas.com/t5/SAS-Programming/a-code-to-mark-to-fist-obs-by-group-that-answers-a-condition/m-p/865987#M341989svh2023-03-23T17:35:37Z