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
1 vote
0 answers
12 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: ...
  • 171
4 votes
1 answer
88 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 ...
1 vote
1 answer
22 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 ...
  • 13
1 vote
0 answers
16 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 ...
0 votes
0 answers
23 views

Proc Mixed LSM standard error doesn't equal manual calculations

My experiment has 3 raw samples, and 17 derived products, made with different processing conditions. The raw samples were done in triplicate, where as the derived products were made in duplicate (i.e.,...
0 votes
1 answer
26 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 ...
0 votes
0 answers
17 views

Effect size measures for a longitudinal mixed effects model with an intervention interaction term

I am estimating longitudinal mixed effects models / growth curve models for 3 continuous outcomes (psychological scales). In my best fit models, I have a dichotomous variable for randomly assigned ...
  • 61
0 votes
1 answer
29 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 ...
1 vote
0 answers
23 views

Do you still need to include "site" as a random effect when modeling matched data set?

I am working on a multicenter propensity matched cohort study. The primary outcome is binary while the secondary outcome is continuous. First I performed multiple imputation to address the missing ...
  • 15
1 vote
0 answers
109 views

Very different results between R and SAS for negative binomial model

I am getting very different results for a negative binomial model between R and SAS. Can you please suggest as to why is this happening? I am not able to add a csv file used as the data. R script: <...
  • 33
1 vote
1 answer
55 views

Mixed model without fixed intercept- Numerator df for Type II and III ANOVA (lmerTest vs Proc Mixed)

It comes to my attention that there is a discrepancy between lmerTest and Proc Mixed for the numerator degrees of freedom (df) for type II and III ANOVA. This only occurs for mixed model without fixed ...
2 votes
0 answers
57 views

Reconciling differences in CI calculated between SAS and R on same dataset

I have been given a brief of replicating statistical analysis which was done previously to verify results. Data being collected are body weights of male and female mice over 20 weeks, given a ...
  • 575
0 votes
0 answers
130 views

Both Shapiro-Wilk normality test results are non-parametric

I have 2 resuls from normality testing via Shapiro-Wilk test: and . If I understand correctly, both have p > α = 0,05 which indicates that both have normal distribution. So for my next analysis, ...
0 votes
0 answers
14 views

Which type of quantiles are safest to report in R?

With this topic in mind: If there is no censoring, can be the naive 3rd quantile different from the one calculated with from the Kaplan-Meier? I'm wondering which one is the safest option. Of course I ...
0 votes
0 answers
18 views

How should I conduct repeated ANOVA if I have multipe group within a person?

I have dataset like follows: In this case, I want to compare the mean difference between A, B, C. Should I conduct repeated ANOVA? ...
0 votes
0 answers
42 views

Degrees of Freedom for Variances in SAS Proc MIXED

Below is a SAS proc Mixed code generated by JMP. Both JMP and SAS give me a confidence interval for the variance components (in the table "covariance parameter estimates"). I would like the ...
0 votes
1 answer
67 views

What happens to zero values during statistical model estimation with a log link function? (SAS PROC GAMPL - GAM)

I fitted a generalized additive model (GAM) using SAS PROC GAMPL with a Poisson distribution and a log link function. The outcome was a measure of repair cost for a large collection of units (4k+). ...
0 votes
1 answer
68 views

GEE - ROC Curves the Same Using Different Cluster Variables

I am creating multiple GEEs with the same covariates, but I am testing different clustering variables. The outcome is a binary yes/no variable and both VAR1 and VAR2 are binary, as well. Patients can ...
0 votes
0 answers
111 views

Interpreting random effect with multiple random intercepts in SAS proc glimmix

We want run an event history analysis using logistic regression in SAS proc glimmix. We want to specify three random intercepts and we are using following code: ...
0 votes
0 answers
83 views

Need help obtaining Cov Parameter Estimates in PROC GLIMMIX

I'm really struggling with something that should be a simple solution but for the life of me, I've been struggling for a while now trying to figure it out. I apologize in advance for my lack of ...
0 votes
0 answers
38 views

GEE Explained Variance is Negative

I am creating a series of GEE models and a couple of statistics I normally report are the ICC and the explained variance for both Level 1 and Level 2 of the model. However, I am calculating that for ...
0 votes
0 answers
48 views

Time-dependent Categorical Covariate in PHREG

I am struggling to use PHREG with time-dependent variables using the "programming approach" (vs. the counting approach). Rather than go into the details this is the general idea. I have a ...
  • 1
1 vote
0 answers
36 views

lmer (R) and proc mixed (SAS)

Recently I have been working on replicating the results from package lmer in R to proc mixed in SAS for mixed modeling. There are multiple model structures that you ...
0 votes
1 answer
82 views

Biplots in R vs in SAS, does the scale parameter differ?

When reading up on biplots in a principal component context, I found that in SAS setting c = 0 gives you a GH biplot that represents the vectors correctly.[1] The same applies in STATA.[2] From what I ...
  • 647
0 votes
0 answers
18 views

How to include replicate weights in McNemar’s Test [marcro with base weight included]

I'm trying to use the macro in this documentation (https://support.sas.com/resources/papers/proceedings/pdfs/sgf2008/382-2008.pdf) with replicate 80 replicate weights , wt01 to wt80. The macro below ...
  • 153
1 vote
0 answers
16 views

Identifying groups with better response to treatment

We have tested a population (splitted in test 50% and control 50%) with a treatment. Overall, the treatment was effective - our test variable was significantly different in the treatment and control ...
  • 11
0 votes
0 answers
10 views

SAS How to conduct paired t-test on off diagonal cells (proc surveymeans)

How to conduct paired t-test on off diagonal cells (proc surveymeans) Posted 45 seconds ago (3 views) Hi, I'm trying to compare same users' response in two separate years. There are many ways to ...
  • 153
0 votes
1 answer
97 views

Weights for estimating ATE (rather than ATT) in SAS %CEM macro for coarsened exact matching?

I'm running Gary King's %CEM SAS macro (available here) for coarsened exact matching (CEM) for a project at work. The macro works fine for estimating the Average Treatment Effect on the Treated (ATT) ...
  • 4,686
0 votes
0 answers
22 views

How to weight my data in SAS - categorical and numerical variables

I've collected data from 1000 animals (categorical and numerical variables) from 2 different farms. My problems are: one farm corresponds to 68% of my data, in some of my variables I've observed more ...
0 votes
0 answers
85 views

AUC and misclassification rate [duplicate]

why do you think that is possible? I compare decision tree with neural network in SAS EM and it chooses DT as the best model, based on misclassification rate, I guess. But AUC is higher for neural ...
  • 3
0 votes
0 answers
25 views

Pre-post model for ordinal outcome

I have outcome data collected at baseline and at one year follow-up. The responses are ordinal, with 0=better, 1=somewhat better, 2=somewhat worse, and 3=worse. My colleague is interested in seeing ...
0 votes
0 answers
57 views

Mediation analysis with covariates SAS

I am conducting a mediation analysis to analyze the effects on moral reasoning towards AVs. I already detected a suitable mediator and do now want to examine the effect of possible covariates (age, ...
  • 1
0 votes
2 answers
65 views

In Survival Analysis, does "Non - Cumulative" Hazard Exist?

In the context of Survival Analysis, I have seen that the standard (non-parametric) estimate of the Hazard Function is through the Nelson-Aalen Estimator : As seen from this formula, the Nelson-Aalen ...
  • 6,038
0 votes
0 answers
11 views

Model of Proc Mixed model in SAS

My data looks like the following ...
1 vote
1 answer
253 views

SAS: Flat line forecast ARIMA model?

I'm trying to forecast a large dataset using ARIMA (The data does not have seasonality), I ended up getting an ARIMA(2,1,2) model where the log of volume was taken due to increase in variance over ...
0 votes
0 answers
70 views

Large dataset time series model help!

I'm doing a time series project on quite a large data set based on the stocks of a company over time. The first image shows quite a large increase in variance over time and suggests the series isn't ...
1 vote
1 answer
194 views

How to construct probability plots for survival distributions in R? An example plot from SAS

Hello I am performing survival analysis I really like SAS's probability plots from lifereg as a way to visualize a distributions' fit and was curious if there is a way to do it in R? Here is the ...
  • 105
0 votes
0 answers
26 views

It should be analyzed as Split-plot design or split-split plot design?

I have a field experiment with 4 blocks as shown in figure (1 block shown). I want to see the effects of Plant desity, spacing and irrigation. I am not sure how to analyze it. Should it be treated as ...
  • 1
0 votes
0 answers
113 views

Cumulative incidence vs Cumulative hazard: What's the difference?

Does anyone know what he difference between the 2 is? I want to calculate the cumulative incidence, but all I see is cumulative hazard in SAS.
2 votes
0 answers
332 views

Negative Eigenvalues in EFA

Assuming a set of data meet all assumptions for EFA and we are doing a factor analysis (with the SMC used to define the shared variance), how do negative eigenvalues appear and what does that say ...
0 votes
0 answers
47 views

Heckman sample selection model

Instead of using a Heckman correction two-step solution, I used a one-step solution by means of multiple equations via SAS PROC QLIM. Is it true that when using a Heckman correction model all ...
0 votes
0 answers
8 views

Should I worry about a really small estimated G-matrix?

I am running cross-interaction with a generalized multi-level model (2-levels) with a Poisson distribution in SAS. I have a random intercept and a random slope as one of my predictors is time-varying. ...
  • 1
0 votes
0 answers
74 views

Restricting model parameters estimates to control the weights in logistic models in python/R

Referring to a similar problem as Restricting model parameters in logistic models in R, is there a method such that I can impose constraints on parameters for a logistic model in either ...
  • 1
3 votes
1 answer
348 views

SAS and R survival package have different confidence interval estimates. Why?

Hello I am learning about Survival Analysis and I noticed that SAS and R survival package produce different confidence interval estimates for the median Survival ...
  • 105
0 votes
0 answers
179 views

Conditional Logistic Regression vs Stratified Cox Regression

I am working with matched case and control data (1:2 matching). And the outcome is binary. In this case, conditional logistic regression can be used to run analysis. To my knowledge, cox regression ...
4 votes
1 answer
72 views

Biostatistics book suggestion

I am a statistical programmer and am working on SAS in a pharma company. Also I have masters in statistics and have interest in the subject. Can anyone suggest me books on biostatistics, helps in SAS ...
1 vote
1 answer
314 views

When is it valid to use lasso and adaptive lasso

I am brand new to LASSO. I have a problem in that I have a data set without about 440 usable cases only about 42 of them of one level of the DV (every level of the DV and predictor have two levels). I ...
  • 1,021
4 votes
2 answers
216 views

Is it worth it to consider a MS Business Analytics program that is heavily focused on SAS? [closed]

I'm completing my undergrad this year and I've finished my graduate applications. I've been accepted to Oklahoma State University MS Business Analytics and Data Science. Looking through the ...
2 votes
1 answer
158 views

How do I choose which confident interval for proportion difference to use in SAS?

In SAS, there are different CIs for proportion difference ($\pi_1-\pi_2$) to choose? 1.Continuity-corrected Wald CIs based on normal approximation 2.exact method 3.Miettinen-Nurminen CIs based on ...
5 votes
1 answer
339 views

Has R fluency overtaken SAS in terms of being more popular as a hiring requirement? [closed]

Seems like when I first graduated (was a while ago, life went in a different direction and I wasn't an analyst for long), almost all the job listings wanted SAS? While R had only got limited traction ...

1
2 3 4 5
14