01-15-2025
genemroz
Quartz | Level 8
Member since
11-14-2019
- 165 Posts
- 13 Likes Given
- 1 Solutions
- 11 Likes Received
-
Latest posts by genemroz
Subject Views Posted 868 12-30-2024 01:24 PM 1180 12-26-2024 11:33 AM 737 12-16-2024 01:22 PM 769 12-16-2024 12:28 PM 831 12-14-2024 12:37 PM 849 12-14-2024 12:26 PM 874 12-14-2024 11:27 AM 485 12-13-2024 01:55 PM 519 12-13-2024 11:28 AM 1021 10-31-2024 03:51 PM -
Activity Feed for genemroz
- Posted Re: Interpretation of Proc TTEST output? on SAS Procedures. 12-30-2024 01:24 PM
- Posted Interpretation of Proc TTEST output? on SAS Procedures. 12-26-2024 11:33 AM
- Posted Re: Proc Expand Puzzle on SAS Procedures. 12-16-2024 01:22 PM
- Posted Proc Expand Puzzle on SAS Procedures. 12-16-2024 12:28 PM
- Posted Re: Output all values greater than 90th percentile? on SAS Programming. 12-14-2024 12:37 PM
- Posted Re: Output all values greater than 90th percentile? on SAS Programming. 12-14-2024 12:26 PM
- Posted Output all values greater than 90th percentile? on SAS Programming. 12-14-2024 11:27 AM
- Posted Re: Subsetting based on intervals on SAS Programming. 12-13-2024 01:55 PM
- Posted Subsetting based on intervals on SAS Programming. 12-13-2024 11:28 AM
- Posted Re: Proc Ginside: Custom polygon on SAS Procedures. 10-31-2024 03:51 PM
- Posted Proc Ginside: Custom polygon on SAS Procedures. 10-31-2024 03:30 PM
- Posted Re: Question about 'excessive use of resources' on SAS Programming. 08-30-2024 03:43 PM
- Posted Question about 'excessive use of resources' on SAS Programming. 08-29-2024 12:33 PM
- Posted Re: How to Proc Import a csv file with variable names on row 3 and data beginning on row 9? on SAS Programming. 08-19-2024 06:16 PM
- Posted How to Proc Import a csv file with variable names on row 3 and data beginning on row 9? on SAS Programming. 08-19-2024 12:47 PM
- Posted Re: Selectively deleting observations within a group on SAS Programming. 05-21-2024 10:26 AM
- Posted Selectively deleting observations within a group on SAS Programming. 05-20-2024 07:55 PM
- Posted Re: Conditional interleaving of two datasets? on SAS Programming. 05-16-2024 03:07 PM
- Posted Conditional interleaving of two datasets? on SAS Programming. 05-16-2024 12:01 AM
- Posted Re: Ranking Challenge Revisited on SAS Programming. 01-28-2023 10:22 PM
-
Posts I Liked
Subject Likes Author Latest Post 1 1 4 3 1 -
My Liked Posts
Subject Likes Posted 1 12-03-2021 09:25 AM 1 11-19-2021 06:04 PM 2 11-01-2021 01:16 PM 1 07-27-2021 03:33 PM 1 07-27-2021 03:34 PM
12-30-2024
01:24 PM
"Overlapping confidence intervals is not equivalent to a T-test." Interesting....thanks for this insight.
... View more
12-26-2024
11:33 AM
Below is the output from the following Proc TTEST:
Proc ttest data=want alpha=.001;
where station in('US0001','US0002');
Class station;
var slm;
run;
The upper limit for the 99.9% confidence limit of the mean for US0002 is larger than the lower limit for US0001. This suggests to me that there is no statistically significant difference between the two means at 99.9% confidence level. Yet the lower confidence limit for the DIF(1-2) value is positive whereas I expected it to be negative suggesting a statistically significant difference at the 99.9% confidence limit. How should I interpret these seemingly conflicting results?
Thanks,
Gene
The TTEST Procedure
Variable: SLM
Station
Method
N
Mean
Std Dev
Std Err
Minimum
Maximum
US0001
25
5.9781
0.0150
0.00299
5.9527
6.0116
US0002
19
5.9560
0.0129
0.00296
5.9413
5.9852
Diff (1-2)
Pooled
0.0221
0.0141
0.00430
Diff (1-2)
Satterthwaite
0.0221
0.00421
Station
Method
Mean
99.9% CL Mean
Std Dev
99.9% CL Std Dev
US0001
5.9781
5.9669
5.9893
0.0150
0.0100
0.0268
US0002
5.9560
5.9444
5.9676
0.0129
0.00822
0.0260
Diff (1-2)
Pooled
0.0221
0.00694
0.0373
0.0141
0.0103
0.0215
Diff (1-2)
Satterthwaite
0.0221
0.00723
0.0371
Method
Variances
DF
t Value
Pr > |t|
Pooled
Equal
42
5.15
<.0001
Satterthwaite
Unequal
41.245
5.26
<.0001
Equality of Variances
Method
Num DF
Den DF
F Value
Pr > F
Folded F
24
18
1.34
0.5299
... View more
12-16-2024
01:22 PM
Thanks for the prompt and clear response. I see where I went off the rails.
Gene
... View more
12-16-2024
12:28 PM
Esteemed advisers:
I’ve been experimenting with Proc Expand. Specifically, with the transformation MOVTVALUE. The documentation says: “They can be viewed as combinations of the moving average (CUAVE, MOVAVE, CMOVAVE) and the moving standard deviation (CUSTD, MOVSTD, CMOVSTD), respectively”. So I was expecting that for a normal distribution, MOVTVALUE would cluster around a value of 0 regardless of the mean of the distribution.
But that’s not what I found. See code below where I created two normal distributions with a mean of 0 and 1. I then used Proc Expand to compute MOVTVALUE and then plotted the result and computed the mean of the t-values.
The plot of t-values for a normal distrubution with a mean of 0 looks as I would expect with values clusters around of mean of (near) zero. But the plot for t-values for normal distribution of a mean of 1 looks very different.
What am I misunderstanding? Thanks in advance for any insights you can provide.
data have;
call streaminit(123);
do i=1 to 100;
test0=rand('normal',0);
test1=rand('normal',1);
output;
end;
run;
proc expand data=have out=out method=none;
id i;
convert test0=tvalue0/transout=(movtvalue 5);
convert test1=tvalue1/transout=(movtvalue 5);
run;
proc sgplot data=out;
series x=i y=tvalue0 /
name='tvalue0' legendlabel="tvalue0" markers markerattrs=(symbol=circlefilled);
series x=i y=tvalue1 /
name='tvalue1' legendlabel="tvalue1" markers markerattrs=(symbol=circlefilled);
xaxis grid;
yaxis grid label='t-value';
run;
proc means data=out mean;
var tvalue0 tvalue1;
run;
... View more
12-14-2024
12:37 PM
Excellent! Thanks!
... View more
12-14-2024
12:26 PM
Thanks for the prompt reply. I tried your suggested code but didn't get the desired result. I was expecting dataset want to contain only those players with more 163 hits (p90) but dataset want contains all 322 players.
See below:
proc summary data=sashelp.baseball;
var nhits;
output out=stats p90=p90;
run;
data want;
set sashelp.baseball;
if nhits >= p90 then output;
run;
... View more
12-14-2024
11:27 AM
Is there a way within SAS to output to a new dataset all values of a variable that are, say, above the 90th percentile? I know I can do it with manual intervention by using Proc Univariate to identify the 90th percentile and then, in a separate data step using a WHERE statement, output values greater than the 90th percentile value. But I'm looking for a way to do it that doesn't require the manual intervention of coding the WHERE statement.
Thanks,
Gene
... View more
12-13-2024
01:55 PM
Thanks for the prompt response. It was very helpful. The start/stop times came to me in a dataset as separate observations. Once I figured out how to get them into a single observation your solution works perfectly. And I apologize for my typo that left 2 F out of the Want dataset.
... View more
12-13-2024
11:28 AM
Esteemed Advisers,
I need a solution to the following exemplar problem of subsetting one dataset (Have) contingent on start/stop values from a second dataset (Interval) to create dataset Want. Thanks in advance for any insights you can offer.
Data Intervals;
Input Interval $ Start $ Stop $;
1 B -
1 - D
2 F -
2 - J
3 L -
3 - N
;
Data Have;
Input ID $;
A
B
C
D
E
F
G
H
J
K
L
M
N
;
Data Want;
Input Interval $ ID $;
1 B
1 C
1 D
2 G
2 H
2 J
2 K
3 L
3 M
3 N
;
... View more
10-31-2024
03:51 PM
Thanks for the prompt response. I was looking for confirmation for what I already suspected to be the case. I think I can figure it out from here....
Gene
... View more
10-31-2024
03:30 PM
Does Proc Ginside require that the vertices of a custom polygon be ordered? If so, what is the appropriate order? Is there an easy way to accomplish this?
Thanks,
Gene
... View more
08-30-2024
03:43 PM
Thanks for these suggestions. In the end, I was able to accomplish the Cartesian join and subsequent sort through a combination of actions:
1. Deleting a couple of unnecessary variables
2. Using the Compress option to make the input and output datasets smaller
3. Dividing the input datasets into smaller subsets for the Cartesian join.
4. Sorting the subsetted Cartesian Join datasets by following the divide and conquer method suggested in a paper entitled "Sorting a Large Data Set When Space is Limited" by S. Sridharma.
A bit tedious to get it all sorted out but it worked...
Thanks to all who responded with suggestions,
Gene
... View more
08-29-2024
12:33 PM
I find my self stuck in a situation where I need to create a full Cartesian Join between two datasets. Dataset OBS has 1000 observations and Dataset JCM has 10000 observations. I’m using Proc SQL, for the join. But during a subsequent sort of the 10 million observation dataset I sometimes (not always) get kicked out of SAS OnDemand for Academics for ‘excessive use of resources’. I’m wondering if whether or not I get kicked out is governed solely by my demand on the resources or is it also dependent on the overall demand for resources by other users. Would I have better luck running this code during off-peak hours? If so, when would that be?
Thanks in advance,
Gene
... View more
08-19-2024
06:16 PM
This turned out to be the easiest approach. Thanks to all for responding with suggestions.
... View more
08-19-2024
12:47 PM
I want to import a csv file with 90 variables (columns) and >100K rows. I want to assign row 3 as containing the variable names. The data rows start on row 9. How can I do this with Proc Import?
Thanks in advance...
Gene
... View more