Questions tagged [sas]

SAS is a statistical software package. Use this tag for any on-topic question that (a) involves SAS either as a critical part of the question or expected answer, & (b) is not just about how to use SAS.

Filter by
Sorted by
Tagged with
2 votes
1 answer
19 views

SAS log likelihood fit statistic from SCORE statement in PROC LOGISTIC

When using a SCORE statement in PROC LOGISTIC in SAS, I can get fit statistics with FITSTAT. My response variable is binary. I want to get log likelihood, but looking at this documentation, I'm ...
cpahanson's user avatar
0 votes
0 answers
20 views

Marginal structural model using PROC PHREG

I would like to fit a marginal structural model to account for treatment switching during follow-up. I found a great paper on how to do this in R: https://www.sciencedirect.com/science/article/abs/pii/...
Emma Jean's user avatar
  • 605
1 vote
0 answers
18 views

Choosing between Negative Binomial, Zero-Truncated NB, and NB with Arithmetically Altered Outcome (SAS)

I am modeling longitudinal Days of Pill Supply with predictors Number of Rx's and Patient Race. I was not able to use linear regression (proc reg or proc glm) because of heteroscedastic residuals, so ...
L.S.'s user avatar
  • 151
0 votes
0 answers
64 views

How does the "ZPH" option of PROC PHREG in SAS 9.4 works?

As I saw in SAS 9.4 documentation, the "ZPH" option in PROC PHREG statement requests diagnostics based on the weighted Schoenfeld residuals for checking ...
Calio Xu's user avatar
  • 113
11 votes
1 answer
485 views

SAS and R produced different results for the same cox ph model on the same data

I have fitted a Cox ph model using both R 4.3.1 and SAS 9.4 with the same data. In SAS, I used Proc phreg, while coxph function ...
Calio Xu's user avatar
  • 113
0 votes
0 answers
13 views

What is seasonality in PROC AUTOREG Durbin Watson Test in SAS?

I want to understand how seasonality for the Durbin Watson Test is defined. If I understand it correctly, the option DW is used for the number of seasons in my data. How can I generally check how many ...
user avatar
3 votes
0 answers
138 views

Difference in SAS PROC MIXED between DF when using type VC vs FA0(1) for one random effect model

I don't understand why the degrees of freedom (DF) are different between TYPE=VC and ...
Davor Josipovic's user avatar
3 votes
1 answer
93 views

Logistic regression with complete separation AND repeated measures

Consider a typical logistic regression on data with a binary response $Y$, and some predictor variables $X$'s. I understand that when the event is rare, or in the case of complete separation, one ...
Ronald Carlos's user avatar
0 votes
0 answers
26 views

Variable Clustering (varclus) R-squared from SAS in R

I am using the varclus function from the Hmisc package in R. Are there ways to produce summary tables from varclus like those in ...
mautumn1's user avatar
0 votes
0 answers
37 views

In Stata or SAS, how do I run a stacked regression with entropy balancing?

My objective is to run stacked regression (DiD) with entropy balancing in the setting of multiple timing for treatments. Initially, my data consisted of panel data for firm-years. I then stacked this ...
user avatar
3 votes
1 answer
86 views

Exploratory analysis to find out characteristics of low scorers

I'm currently looking at three specific questions of a feedback survey and have been tasked with finding out the characteristics of the lowest scorers, to see if there are any patterns or common ...
sixfortyseven's user avatar
13 votes
2 answers
250 views

Beyond AR(1) as a covariance structure for mixed models with repeated measures

I have been reading about alternatives to assuming an AR(1) covariance structure for mixed models with repeated measures (in time). In particular I have heard about Toeplitz and Ante-dependence ...
Harmony's user avatar
  • 304
4 votes
1 answer
135 views

Doubts about mixed model (R vs SAS) with nested random effects [closed]

I use SAS to fit a simple mixed model where there is nested random effects of Block within Location like this: ...
user1029384756's user avatar
4 votes
1 answer
140 views

How should I analyse this experiment with two blocking factors

In this experiment, a machine is used to compare the wear resistance of 4 different types of rubber-coated fabric (variable mat coded A, B, C and D). To do this, ...
Vivek Sharma's user avatar
3 votes
1 answer
210 views

What is a Randomized Complete Block Design. How do we create one and analyze it?

I have been reading about experimental design, and Randomized Complete Block designs (RCBD) in particular and I have a few queries. What exactly is a randomized complete block design ? Is there a ...
Vivek Sharma's user avatar
1 vote
0 answers
108 views

Correspondence between SAS proc surveyreg and R svyglm [closed]

I am trying to model my proc surveyreg from SAS in R, because their survey package provides an IV option that I intend to use. <...
Stine Fürst's user avatar
1 vote
1 answer
128 views

In SAS what is the difference of including treatment variable in model and using the strata statement for treatment variable?

Im building a Cox Regression in SAS. My code looks like this: ...
Jam.Wil's user avatar
  • 77
2 votes
0 answers
38 views

How to solve MME [closed]

I have spent an entire day trying to figure out how to solve these mixed model equations without any luck. I am therefore reaching out to this community. The assignment is as follows: Using the ...
Therese's user avatar
  • 21
5 votes
1 answer
104 views

Understanding SAS Mixed Model Syntax

I'm used to specifying mixed models with mathematical notation or in R using the lme4 syntax. Now, I was asked to review a mixed model fitted in SAS. The SAS model ...
retodomax's user avatar
  • 511
0 votes
0 answers
19 views

Analyzing discrete Proportional Data with different sample sizes in GLMM?

I am reaching out to seek guidance regarding an issue that has been troubling me for a while. In my study, I had participants choose a strategy for expressing 6 different emotions across * 5 social ...
MyL's user avatar
  • 1
0 votes
2 answers
72 views

Difference of output in Chi-square in SAS and R

Currently I have a dataset with an N of 3866 with two variables, Project (group variable, six levels) and Topbox (two levels; yes, no). We are looking to see if there is a difference in the proportion ...
sixfortyseven's user avatar
0 votes
0 answers
150 views

Games-Howell multiple comparisons test in SAS

I am looking to determine whether patient's total number of prescriptions (RxTotal) differs by membership within 3 possible groups (ie run an ANOVA), and if so, to determine which groups differ (ie ...
L.S.'s user avatar
  • 151
2 votes
1 answer
33 views

Need some help/guidance on GLMM questions

Newbie with linear mixed modelling here. Need some advice/help on my problem detailed below. Dataset below with assessments taken at different visits: baseline (visit=1), and then at 30 days, 60 days ...
R. Simian's user avatar
0 votes
0 answers
17 views

Rate of lost to follow-up at first year

Is this the correct way to calculate the rate of lost to follow-up at first year? Rate of lost to follow-up at first year= rate of censored subjects at firstyear. There is no specific method for that ...
ACHD's user avatar
  • 3
0 votes
0 answers
83 views

How to calculate the sample size when compare rate using Poisson regression?

I have a question regarding the sample size calculation if I want to compare rates using Poisson regression. I want to compare the rate of book A to the rate of book B. The rate of book A is defined ...
NewRUser's user avatar
0 votes
0 answers
25 views

Calculating Inter-Observer Reliability when not all categories are scored

I have two main questions: 1) Is there a way to calculate IRR when the range of scores differ between observers? If not, how do you get IRR without excluding data? I am calculating inter-observer ...
user1762's user avatar
0 votes
0 answers
82 views

Why is there different Geometric Least Square Means for same treatment?

According to the study protocol, we used the MIXED model technique (in SAS) to estimate the ratio for example C vs A , C vs D, and its 90% confidence interval. However, in the ANOVA output, for ...
Reilly Ward's user avatar
1 vote
0 answers
69 views

Logistic regression with binary and ordinal variables (SAS)

I have survey results (n=14, small size, I know) which scored several health measures from Poor (1), Fair (2), Good (3), Very Good (4), and Excellent(5). I want to see if having a physician (0=no, 1=...
Amy's user avatar
  • 11
0 votes
0 answers
27 views

Are two marginal distributions of a student-t copula equivalent to using two independent uniform distributions?

I am trying to figure out if these two are the same: Using the marginal uniform distributions of a student-t copula Using independent uniform distributions I have generated SAS code to figure this ...
Aaraeus's user avatar
  • 101
1 vote
0 answers
120 views

SAS: How do I preform a interrupted time series analysis using PROC GENMOD with a binary outcome?

I am trying to conduct an interrupted time series analysis looking at lab test rates (outcome) and how they changed due to the COVID shelter-in-place order in March 2020. I am making use of this paper ...
M. Yates's user avatar
0 votes
0 answers
109 views

Restricted Cubic Spline-RCSPLINE macro

I have to manually create basis functions for a variable but SAS doesn't seem to have a procedure to do it. I am using Frank Harrell's macro RCSPLINE but the basis variables are not identical to ...
Pam G's user avatar
  • 13
1 vote
0 answers
53 views

SAS Error on ANOVA Code [closed]

I have been having this problem with SAS all year and I can fix it, but it ends up being time-consuming. Example: When I use the code attached (a simple ANOVA code) I get errors that say I have ...
Kimber's user avatar
  • 53
0 votes
0 answers
20 views

Estimating treatment effects, 2 Group Pre-Post Matched Analysis

I am trying to estimate the treatment effect for a pre/post w 2 groups design, subjects were measured on healthcare utilization 1yr before and after the intervention (non-random assignment). The ...
bzagor1's user avatar
0 votes
0 answers
54 views

PROC GLIMMIX Simple Slopes Neg Bin

I'm attempting to plot simple slopes of my neg binomial from PROC GLIMMIX. I've been using the resources from UCLA (https://stats.oarc.ucla.edu/sas/seminars/analyzing-and-visualizing-interactions/) ...
Pevitr Bansal's user avatar
8 votes
1 answer
110 views

Test for synergy using Bliss independance model for two drugs

I have a dataset of 40 patients which receive 4 different treatments, group 1, is placebo, group 2, drug A, group 3, drug B and group 4, drug A+B. Only one dose from each drug and combination. I would ...
Ecatrina Smith's user avatar
1 vote
1 answer
46 views

2-way Anova on Unequal Group Proportions

I’m working on a dataset collected from a 2-way Anova design (kind of) on binary data. The purpose of the experiment is to explore how different types of email marketing incentives affect customers ...
Bilal 's user avatar
  • 11
0 votes
1 answer
34 views

GEE results showing opposite of true marginal relationship with EXCH working correlation

I am working on a modelling issue with two main effect variables: time period and Setting, related to an outcome, with all 3 being binary. My PI wants to test for moderating effects, so we have an ...
H. Dampf's user avatar
1 vote
0 answers
24 views

How can I get the Basic Estimable Functions for a design matrix in R?

When using the GLM procedure in SAS for an overparametrized ANOVA model, it shows you the General Form of the Estimable Functions for the given model, i.e. the basis of the functions of the model ...
Jef Winant's user avatar
2 votes
1 answer
706 views

Logistic Regression models with two or more response variables in R/SAS

There are a lot of inconsistencies in the literature over what should be the appropriate term(s) for the regression models involving two or more responses, and if they are binary/continuous, for more ...
AAA's user avatar
  • 123
1 vote
0 answers
60 views

Implementation of Scheffe's adjustment in software

My understanding of Scheffé's adjustment for multiple comparisons is that it already adjusts for any possible contrast that one could make with the data, where the contrast coefficients sum to 0. ...
Michael Cooney's user avatar
5 votes
1 answer
187 views

SAS Proc Mixed Repeated VS Random (or Both)?

I have data from a study for a "device". Subjects receive an implant and are followed for 5 years, with a checkup every year. A "disability score" is calculated from a survey every ...
SASsy pants's user avatar
0 votes
0 answers
69 views

Why do type 3 tests give different results than GEE for a binary predictor in SAS

I'm using PROC GENMOD in SAS to model a continuous outcome as function of flight which is binary (1=yes, 0=no) and a categorical predictor (ethnicity.) So I ask PROC GENMOD to output type 3 statistics....
user3443575's user avatar
2 votes
2 answers
128 views

Program to select dates for seasonality

I am looking for a function (preferably SAS) that can read daily/weekly/monthly data from over a few years and select the two best dates to separate the year into two seasons (not necessarily of equal ...
Chana's user avatar
  • 21
0 votes
1 answer
1k views

Mixed model for repeated measures with different timepoints and intervals

is there a way to design a mixed model for uneven number of measurements per subject and (more importantly) with uneven time intervals between measurements which are taken at different time points (...
opiczak's user avatar
  • 23
1 vote
0 answers
60 views

converting proc mixed to R [closed]

I have been trying to convert some PROC MIXED SAS code into R, but without success. The code is: ...
user20780's user avatar
  • 171
7 votes
3 answers
760 views

Why Do Residuals Need To Be Homoscedastic (Equal Variance)?

I am MBA student and am taking a course on "Research Methods" - in this class, we are learning how to perform basic statistical analysis such as Hypothesis Testing and Regression Models. Our ...
stats_noob's user avatar
1 vote
1 answer
291 views

Cox model for different time intervals within follow up time

I have a survival data upto 10 years of followup. I now need to run Cox models for different time horizons like 0-2yr, 2yr-4yrs, 4-6yrs and so on. Is there an easy way to do it in SAS or do I need ...
Pam G's user avatar
  • 13
1 vote
0 answers
52 views

Linear mixed model with repeated measures at two timescales

I want to use a Linear Mixed Model on the following design: 20 subjects with one between-subjects factor (10 males, 10 females). Each subject is measured at 4 timepoints: At 0 weeks, 2 weeks, 4 ...
Robert Rovetti's user avatar
1 vote
1 answer
88 views

Reformat data problem for Cox model in SAS

I am relatively new to SAS. Currently I am taking survival analysis course, and I am really stuck on reformatting a data into 'counting process' (start, stop) form for fitting a Cox regression model ...
Ronald Carlos's user avatar
0 votes
1 answer
260 views

How to create KM curves with time-dependent covariate

Some patient received an treatment as treated group and some did not as control group. In order to consider "immortal time bias", I coded the treatment as a time-dependent covariate. Could ...
user1813615's user avatar

1
2 3 4 5
15