Tagged Questions

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

3answers
373 views

Grouped income data in Stata or SAS

I have an income distribution dataset which I am attempting to manipulate in Stata (or SAS). I need to come up with a table listing the number of households earning between one income level and ...
2answers
156 views

Increasing the number of bins in a SAS 9.2 contour plot

Borrowing from this post on SAS and R: http://sas-and-r.blogspot.com/2011/07/example-92-transparency-and-bivariate.html I've got a large collection of data that's best approached (or at least well ...
4answers
703 views

Problem with plotting with SAS

I'm very new to SAS, so please keep that in mind with any responses. I've been running the following code in SAS: ...
1answer
141 views

In SAS, is there a way to iterative refit a regression using different weights for observation with positive residual and negative residuals?

I have fitted a model using proc reg, say, using this proc reg data = mydata; model a = b; run; But in this particular application it is better to ...
2answers
523 views

In SAS, how do I perform a one sided test of the coefficient in a linear regression?

Say I have fitted a model using proc reg data = data; model a = b; run; How do I test if the coefficient of b is, say, less than 1?
1answer
199 views

Sampling from a posterior distribution in SAS

Lets say I have a dataset where I want to estimate the relative risk of outcome X based on a binary treatment level Y, using PROC GENMOD to fit a logistic regression model. I can use the BAYES ...
2answers
641 views

Treating categorical variables in logistic regression in SAS

I am scoring my dataset using a logistic model. For getting the betas (coefficients) I used proc logistic y = x1 x2 x3. To tell the model which are class variables ...
5answers
3k views

Is there an R equivalent of SAS PROC FREQ?

Does anyone know of an R equivalent to SAS PROC FREQ? I am trying to generate summary descriptive statistics for multiple variables at once.
1answer
117 views

Deriving risk estimates using forecasting confidence limits and out of sample hold-out cases

I was hoping for some advice. I use SAS for automatic forecasting (I have a large number of forecasts to complete in a limited timeframe). As part of the forecast output from SAS, I get a mid-point ...
2answers
1k views

Marginal effects of a logistic model, and their standard errors

I am using SAS to estimate some logistic models. Usually, I work with either MDs or social scientists, and odds ratios are the preferred metric. But I am now working with a client in economics/law and ...
2answers
438 views

Imputing missing values in time series using SAS

If I have missing values in a time series that has 40 quarters (ten cycles or ten years) of data, what is the best SAS procedure to use to impute the missing values? Part 2: I have 390 series (40 ...
1answer
602 views

Neural network with PROC logistic in SAS

I am wondering if somebody has used or has any reference to point as to how a neural network in conjunction with PROC logistic can be used in sas. A code would be an ideal thing for me but if ...
2answers
160 views

Pairwise exclusions

I am running a logistic model on insurance data. I have a field agent gender which matters for a channel A (say) and doesn't matter for B. I want to put null values in case of B. The only thing I risk ...
2answers
2k views

Formula for autocorrelation in R vs. Excel

I am trying to figure out how R computes lag-k autocorrelation (apparently, it is the same formula used by Minitab and SAS), so that I can compare it to using Excel's CORREL function applied to the ...
1answer
1k views

How does one fit conditional Poisson regression in SAS?

I'm interested in fitting a conditional Poisson regression model using PROC GENMOD in SAS to analyze a matched cohort study. However, it's not quite clear to me how I should exactly go about it. My ...
3answers
3k views

How to choose the link function when performing a logistic regression?

I am running a logistic model. In SAS Entreprise Miner, I noticed there's a link function that has three possible options: logit, ...
2answers
3k views

How do I ensure PROC ARIMA is performing the correct parameterization of input variables?

I'm trying to forecast using ARIMAX with two exogenous (input) variables. I'm using PROC ARIMA, but I can't figure out from the SAS documentation whether my code is producing the parameterization I ...
0answers
839 views

Interpreting logistic regression output from SAS [closed]

I have a very basic query. I ran a logistic model in SAS Entreprise Miner and got the output. Let's say we have a categorical variable with 3 categories. It creates a dummy variable for 2 categories ...
4answers
847 views

Regression for dependent variable with 4 categories

I want to do a regression where my dependent variable has four categories (1,2,3,4) which represents the number of dependents. Can I do this with logistic ...
2answers
1k views

How to get convergence using coxph (R) given that model converges using proc phreg (SAS)

I have a data set ...
4answers
595 views

Improving accuracy of a binary classification when the target is unbalanced

I am working on the BRFSS dataset with the goal of predicting Diabetes. The dataset has 500,000 rows and 405 columns. It is a 0/1 classification problem, the ratio of 0 to 1 is 90:10. I tried using ...
1answer
2k views

How to perform logistic regression with lasso using GLMSELECT?

I am trying to perform logistic regression with lasso. For the logistic regression part I am using PROC LOGISTIC but I am not sure how to do lasso with ...
0answers
213 views

Multiplicative mixed models for analyzing variety-by-environment data

I got some nice data on multi-environmet trials (MET) data for genotype evaluation and would like to use some new developed techniques as discussed in Smith et. al 2005 Smith et. al 2005. I'm ...
3answers
385 views

Binomial data analysis with all 0 responses for some treatment groups

We have a series of experiments where we measure virus transmission to plants when exposed to virus-infected insects for different time periods, so all of the experiments have similar types of ...
1answer
604 views

String replace in SAS?

Let's say I have a file A1.txt and a file A2.txt. I have written the statements filename in1 'A1.txt'; filename in2 'A2.txt'; Now, I want to re-do this using B1 ...
0answers
1k views

How to calculate Newey West t-statistic in SAS 9.2?

I need to run Newey West t statistics in SAS 9.2. I already run regression, White's test, Breusch Godfrey test and Jarque-Bera normality test. Regression is simple. Number of observations = 522 ...
4answers
928 views

Understanding multiple regression output

I am a first year psychology student. I am doing some research work with a prof, unfortunately the material that I need to use right now is covered only in my second year. But I need to already know ...
3answers
435 views

Resources for an R user who must learn SAS

I use R. Every day. I think in terms of data.frames, the apply() family of functions, object-oriented programming, vectorization, and ggplot2 geoms/aesthetics. I just started working for an ...
1answer
97 views

How to pass character strings to R from IML Studio

If I define a function in IML: start func(a); submit a / R; print(&a); endsubmit; finish; and run it: ...
2answers
715 views

Interactive decision trees

I was wondering if there is a free tool to build a decision tree in interactive fashion like in SAS Enterprise Mining. I'm used to work with Weka. But nothing fits to my needs. I would like that ...
1answer
142 views

Getting rid of file download warning in SAS [closed]

I create SAS output in .rtf format and the File Download warning pops up each time. I need to turn this off for all files that I create. How?
2answers
2k views

Difference between ridge regression implementation in R and SAS

I have been reading the description of ridge regression in Applied Linear Statistical Models 5th Ed chapter 11. The ridge regression is done on a data set available at body fat data The textbook ...
1answer
302 views

Can we get confidence intervals for entries in stationary vector for an absorbing, time-independent Markov chain?

I have a finite-state, time-independent Markov chain with two absorbing states which models educational outcomes (the absorbing states are completing and not completing). The transition probabilities ...
0answers
360 views

Interactions in Log Transformed DV

I built a fixed effects model using time series cross sectional data. The model was built using PROC MIXED in SAS. There are 2 effect coded attributes in the model and inteactions. One dummy ...
1answer
361 views

Proc Calis (or TCalis) and p-values

Anyone know why when you run a SEM model in SAS using proc calis (or tcalis) you do not get p-values for the parameter estimates? It does supply a t-value however. Two popular SEM packages in R, ...
2answers
574 views

Converting an SPSS file to a SAS file?

(I'm asking this question for a friend, honest...) Is there an easy way to convert from an SPSS file to a SAS file, which preserves the formats AND labels? Saving as a POR file gets me the ...
2answers
594 views

Reducing false positive rate

I am running a model for a problem in insurance domain. The final results show some false positive x and some false negative y. I am using SAS Enterprise Miner for this. Can somebody suggest me how to ...
3answers
1k views

SAS/IML compared to R

I was wondering if anyone had experience with SAS/IML and R, and can give some pointers as to the relative advantages/disadvantages of the two. I've used R extensively for programming and statistical ...
1answer
458 views

Read decimal values in SAS

For this dataset: data my; input x y; datalines; -122.413582861209 37.7828877716232 -122.417876547159 37.7848288325307 ; proc print; run; The ...
1answer
391 views

Replicating R model in SAS

I've got a model that I've developed in R, but also need to express in SAS. It's a double GLM, that is, I fit both the mean and (log-)variance as linear combinations of the predictors: \$E(Y) = ...
4answers
2k views

Obtaining SAS experience

I have been looking at analyst job postings and one of the most common requirement is experience of SAS. Unless your organisation currently uses SAS, how can you train as a SAS user? What ...
1answer
477 views

Access tables created in SAS Enterprise Guide Client into SAS Enterprise Miner Client?

How can I access tables created in SAS Enterprise Guide Client into SAS Enterprise Miner Client?
2answers
1k views

What would a confidence interval around a predicted value from a mixed effects model mean?

I was looking at this page and noticed the methods for confidence intervals for lme and lmer in R. For those who don't know R, those are functions for generating mixed effects or multi-level models. ...
5answers
2k views

In PC SAS, how do you copy & paste from the output window?

Sometimes, I just want to do a copy & paste from the output window in SAS. I can highlight text with a mouse-drag, but only SOMETIMES does that get copied to the clipboard. It doesn't matter if I ...