# Tagged Questions

SAS is a proprietary cross-platform general-purpose statistical software package. [Official Website](http://www.sas.com/index.html)

436 views

### Equivalent mixed models yielding different results in SAS

Below I show two equivalent ways to write a mixed model in R and SAS. The two R models as well as the two SAS models yield the same estimates of the random and fixed effects and the same standard ...
499 views

### SAS optimal binning

In SAS enterprise miner we have the optimal binning feature which allows you to transform continuous variables into an ordered set of bins. The binning, as I read from one of their docs, is done so ...
129 views

### Problems with interpretation of a CLASS variable with many levels in a logistic regression model

Thank you in advance. I am trying to build a model to predict the possibility of ordinal accident levels in a nuclear station if an accident happens. The accidents include four levels: ...
193 views

### SAS fails to fit a mixed model

Here are some simulated data: ...
686 views

### Bayesian Analysis in R/WinBUGS and SAS (Proc MCMC)

I have a Bayesian model here in R/WinBUGS. This data "pumps" has two columns, time and fail. Each observation is a pump and fail[1] tells how many failures there were in time[1]. I want to know how I ...
231 views

### How to calculate fitted values when using AdaBoost via gbm package in R? What does fitted values mean?

I poseted this question about two weeks ago. But it was closed because I cross-posted here and on SO. So I deleted the post on SO and re-post here. My question is as below. First of all I'm not ...
196 views

### Whether to include time as a covariate in repeated measures analysis

Suppose we want to model the temperature ($1$ = hot, $0$ = cold) of 5 regions over the following time periods: 1 month, 6, months, and 4 years. Suppose a predictor variable is $X$ (amount of ...
214 views

### How do you interpret the coefficients in PROC GLIMMIX and PROC GENMOD?

For clustered data, how would you interpret the coefficients? Would you just exponentiate the coefficient to get an odds ratio?
871 views

### ANOVA in SAS: Not Statistically Significant but LSMEANS says is?

I'm running an ANOVA model. I found my model does not meet constant variance assumption and corrected for that using a weighted ANOVA model. I don't think that changes anything.. After I run the ...
461 views

### Floating Point Overflow while computing the Kaplan-Meier estimator in SAS

I try to estimate survival curves based on a Kaplan-Meier estimator using proc lifetest. However, SAS outputs an error message which I do not manage to circumvent. ...
367 views

### Resampling with SAS/IML

I am defining the basic matrix: 1 2 3 4 5 6 7 8 As follows: ...
341 views

### How to calculate fitted values when using AdaBoost via gbm package in R? [closed]

First of all I'm not good at English. So please be patient to interpret my words. I really need your help. I used the R package GBM as probably my predictive modeling. I made a model with adaboost ...
70 views

### Confidence intervals on a matrix of data in SAS

I have the following matrix of data, which I am reading into SAS: ...
541 views

### Convergence failure with step-by-step parameter estimates in SAS proc logistic using the OFFSET option

I'm trying to fit a logistic model of the following form: $$y \sim \frac{1}{1 + \exp(-\beta_X)}$$ where $$\beta_X = a_0 + a_1x_1 + a_2x_2 + a_3x_3 + a_4x_4 + a_5x_5$$ In my case, there is ...
134 views

### SAS: When using “by” statement, what does “var1 = .” mean in output?

Let's say I have some simple code like what is below. proc sort; by var1 var2; run; proc gplot; plot y*x ; by var1 var2; run; In the output, there are a ...
137 views

### How does SAS calculate exact non-parametric statistics?

I have written C++ code to calculate the exact Jonckheere Terpstra distribution (and therefore p-value) by enumerating all the possible combinations. I've found that PROC FREQ in SAS has option JT and ...
309 views

### How to draw B-spline plots via the PROC GLIMMIX procedure in SAS?

Recently I found that the PROC GLIMMIX procedure in SAS added a statement effect, which can handle B-spline in models. I tried ...
2k views

### Type III sum of squares from SAS and R

I'm analyzing data from an unbalanced factorial experiment both with SAS and R. Both SAS and ...
447 views

### Survey weights in logistic regression models

We are interested in fitting a multiple logistic regression model using data obtained from a national survey of children with special health care needs. The data has an accompanying weight variable ...
51 views

### Expressing observations in regression

Suppose we are using logistic regression on a binary outcome variable $Y$ with two continuous predictors $X_1$ and $X_2$. Suppose the observation $Y = 1, X_1 = 10, X_2 = 15$ occurs 1000 times. In SAS, ...
520 views

### SAS' PROC ARIMA does not converge

I have an error that says The estimation algorithm did not converge after 50 iterations and the forecast was not done. What can I do to prevent this error? Like how can I check the data before ...
175 views

### What does the following message mean in SAS? [closed]

I received the following message in SAS: Measures of association between the observed and predicted values were not calculated because the mean scored predicted probabilities are ...
446 views

### lift/uplift/netlift modeling: CART analysis maximizing a t-statistic from a multivariate regression

For tree based modeling most packages use some data element as the dependent variable. In uplift modeling the goal is to maximize the difference between treatment and control groups. One way to ...
390 views

### How to plot frequencies vs. values in SAS (power-law style graph)?

I have a set of counts as a response variable (anywhere from 0 to 85). I want to find the easiest way to plot count on the y-axis vs frequency of that count on the x-axis, the type of plot you see in ...
386 views

### Interpretation of a log likelihood function for PROC NLMIXED in SAS

I have a data set of skewed nutrient intake values, from around 7800 individuals, of whom around 3000 had two measures of daily nutrient intake (the others only had one measure), so this is a repeated ...
117 views

### Nonlinear mixed methods, Monte Carlo simulation and appropriate use of weighting for population distribution estimation

Note: I do not have access to SAS so I am trying to interpret the code off the macro syntax. I have frequency-weighted data of nutrition intakes. The frequency ...
333 views

### How is the SAS REPLICATE statement in PROC NLMIXED different from a FREQ statement?

Note: I do not have access to SAS to work this out for myself. I'm trying to work out the difference between the FREQ statement ...
142 views

### How to find implementation details for a SAS procedure?

I was was wondering about where to track down implementation details for SAS: I have certain outputs (depending on small amounts of data) which I would like to understand better by trying to check ...
633 views

### Cross-validation with sampling weights

I am trying to cross validate a logistic regression model with probability sampling weights (weights representing number of subjects in the population). I am not sure how to handle the weights in ...
174 views

### Online resources to aid in understanding SAS results

Every time I look at SAS's result page I get lost among the numbers. Is there any online material that can help with understanding SAS's result page?
330 views

### SAS proc mixed empirical standard errors

I'm fitting a 3 level mixed model and trying to compute empirical rather than model-based standard errors for the fixed effects. When specifying the empirical option in PROC MIXED, I get a warning ...
373 views

### Testing for heteroscedasticity

I try to run white test in sas and it return this error message to me. ERROR: There is no model program. Cannot perform requested tasks What is the problem? ...
134 views

### How can I transform a column into date format?

One of my date column doesn't read in date format, but I need to use the function WEEKDAY() on it. How can I transform the data format of that column into date ...
267 views

### How do you plot survival functions for specific values of covariates in SAS?

Suppose I do the following: proc phreg data = new; model time*censor(0) = x y; run; Also suppose $x$ is a binary variable and $y$ is a ...
461 views

### SAS Code for Survival Analysis

In PROC PHREG, how do you set a continuous variable at a certain value as the reference level? For example, suppose x = 3.5, 3.6, 4.3, 5.4 and we want x = 6 to be the reference level. How would you do ...
200 views

### Good resources about reversible-jump MCMC sampler in R

Please help me to find out simple (I mean useful with little knowledge on Bayesian statistics) resources: To learn MCMC and perform general linear or mixed models To learn different sampling ...
828 views

### SAS Proc Arima - DF, ADF, SIC, AIC, autocorrelation in residuals

I am using Proc Arima to produce the Dickey-Fuller and the augmented Dickey-Fuller tests. According to documentation Proc Arima uses the Dickey-Fuller method that tests the following hypothesis: ...
1k views

### How do you perform the likelihood ratio test in SAS?

I want to compare model $A$ with 5 variables and model $B$ with 3 variables. I want to use the likelihood ratio test to do this. Note that this is logistic regression. How do I do this in SAS?
219 views

### Dummy coding in SAS

Apologies for the uninformative title. This is actually a fairly simple problem which I could easily do myself in matlab or perhaps stata, but the professor demands it be in SAS, which seems to have ...
345 views

### How do you compare OR between different groups using SAS?

How do you get a confidence interval for an odds ratio between two different groups (both of which are not the reference group) in SAS? Suppose $x_1$ is the reference level and $x_2,x_3,x_4$ are the ...
250 views

### Model selection in SAS surveyreg analysis of complex surveys

What are model selection methods are applicable in this setting? Is it possible to calculate AIC or BIC with SAS's surveyreg output?
219 views

### How to find weekly sum from daily data in SAS?

I found it is quite inconvenient to do row operations in SAS. Any good ideas?
709 views

### Computing Mallows' Cp with SAS

I have a question about SAS: How do you get the parameter estimate for Mallows' Cp procedure in SAS?
611 views

### Why proc mixed give different DF than proc glimmix?

I am trying to move data analysis from proc mixed to glimmix for the easy of the ilink transformation. However I am finding a big difference on the denominator DF when using either of them. As ...
1k views

### How do you plot interaction effects in SAS? [closed]

I want to plot interaction between two variables in SAS. One is continuous and the other is binary.
614 views

### How can I apply models to predict the output of a test dataset using SAS?

I'm trying to use SAS from more of a machine learning perspective than a pure stats perspective. I want to perform resampling on a dataset to measure the predictive accuracy of a LDA and Logistic ...
145 views

### Logistic regression linear hyperplane

I'm performing logistic regression for binary classification in SAS and it outputs all of the coefficients to the logit model. I was wondering how you would take those coefficients and use them to ...
382 views

### Resources and R code for analysing advanced experimental designs?

I switched from SAS to R. I was using "SAS Code for Some Advanced Experimental Designs" as a reference whenever I had data from ...