sas

  1. P

    Converting "Proc format"SAS to "value labels"SPSS

    Hello to all, I'm new here and my english is quite not fluent at all. So sorry for my english. For my issue, I'd like to try to adapt a SAS code program into SPSS. I'm still a newbie at those softwares that's why I am a bit bothered with some stuff that may appear like a piece of cake for...
  2. V

    Summing Weekend values to previous Friday

    I am finding a gap in continuous data that is throwing a wrench in a bivariate VAR. I need a way in SAS to sum the weekend data of one variable in order to match a day by day set of another (stock price data), How do I do that? set1 date var1 20130411 2.3 20120412 3.1...
  3. V

    Logistic Regression Probability Estimation

    Hi I am a learner who is trying to build my first stats model which is aiming at winning chance prediction for business quotes. The stats model I use is the logistic regression. after going through the variable selection process it finally contains 4 categorical variables plus 2 numeric...
  4. D

    Molding Time in SAS

    How can I build a time variable into my model? I am building a model in SAS and I want to use time of day as a way to predict Y. "Are people more willing to pay for something based on what time of day it is?" I expect people are more willing to pay for something at different parts of the day...
  5. D

    Day of Week (Mon-Sun) Modeling in SAS

    Hello, If I am trying to explain Y using the day of the week (Monday, Tuesday, Wednesday, etc) in SAS. can I simply convert each day to a numerical form? For example: Monday = 1 Tuesday = 2 Wednesday = 3 Thursday = 4 Friday = 5 Saturday = 6 Sunday = 7
  6. R

    Transposing rows and columns with variable names

    I'm new to this forum so my apologies if this is done incorrectly. Here is my problem- I have a SAS dataset with few columns and many rows and different types of variables. I need to literally just transpose these so that the entries in the first column become the variable names. Proc...
  7. J

    Best regression using ANOVA technique: trend comparisons in a 3x5 factorial

    Hello all: I need help using the ANOVA technique to arrive at an appropriate form of a multiple regression equation between the response (disease severity) and the two factors tested (spring rate) and (summer rate) in an field study. The experimental design is a 3 x 5 factorial arranged as a...
  8. E

    Variable labels in Proc Mixed

    I am analysing multiple variables var1 - var10 which have labels. They are named as such so that running a do loop is easy in a Macro. When running Proc GLM it displays both the variable name and the label in the output by default. When running proc mixed only the variable name is displayed. How...
  9. A

    p-value for bootstrap logistic regression

    I am new with sas and I'm doing logistic regression with several predictive variables. I am using the following code; proc surveyselect data=subset method=urs samprate=1 rep=1000 out=boot; run; proc logistic data=boot outest=estimates ; model uq7_maxabin(event='1')= uq7_base v6500...
  10. J

    Help with SAS assignment - I do not know how to do this in SAS??

    Study the notes “Simulations in SAS” and answer the questions that follow. Questions 1. Draw 10000 values randomly from a standard normal population and determine the following probabilities empirically (that is through a simulation). a) P(Z < 1.8), Z ~ N(0,1). b) P(–1.024 < Z <...
  11. D

    Exporting to SAS from big excel file with 10,000 rows and 1000 columns/reorganizing

    Dear Friends, thanks in advance for your support and help. I have a big excel file which needs to be exported into sas. I need to reorganize the data when the SAS data set is created. To explain what I mean I have created a tiny sample of excel file in the attached file. Sheet 1 mirrors the way...
  12. C

    SAS repeated measures ANOVA, comparison of within-time effects?

    Hey guys, this is my first post, so thanks in advance for reading. I am using SAS, and comparing the effects of a drug on a biological measure, additionally I am taking repeated measurements from the same experimental setup. I have two treatment groups. I can navigate main effects...
  13. S

    Any way to read in a SAS dataset WITH an external format/catalog library?

    Hi, I posted this to the SAS forum as well. I have a large SAS dataset (v9.3) that carries a SAS format catalog/library (as a separate file). Is there any way to import the dataset with the formats (which is the SAS term for value labels here)? I am using Stata (v11/MP). The data moves...
  14. S

    Stack columns (in same dataset) in SAS

    I know that you can concatenate Using the DATA Step for different data sets. But how do you stack specific columns in the same data set? I have variables x1 to x10 in a data set. And I want to stack them into two columns: (col 1): x1, x3, x5, x7, and x9 and (Col 2): x2, x4, x6, x8, and x10...
  15. S

    PROC SQL macro into an ARRAY

    I am trying to create a macro (&varlist) using proc sql ---> then putting the variable into the array item[3]. But I get the error "Too few variables defined for the dimension(s) specified for the array item" What's wrong here? Any help would be greatly appreciated. proc sql noprint...
  16. S

    SAS: cdf for contaminated normal (PROC IML)

    Denote f(x;μ,σ) and F(x;μ,σ), respectively, the p.d.f. and the c.d.f. of N(μ,σ^2). The p.d.f. and the c.d.f. of contaminated normal cN(μ,σ2,σc^2,p) (a N(μ,σ^2) contaminated in spread by a N(μ,σc^2) with probability p) are (1-p)f(x;μ,σ)+pf(x;μ,σc) and (1-p)F(x;μ,σ)+pF(x;μ,σc), respectively...
  17. N

    renaming all variables in a large dataset

    Hello, I have 3 large datasets with over 800 variables that I need to merge. Problem is some of the datasets have the same variable names so I need to rename all the variables in each data set prior to merging. The renaming would be systematic as I would like all the variables in dataset1 to...
  18. H

    Different results from SAS Proc Mixed and SPSS Mixed

    I'm running some analyses where SPSS and SAS are giving me different results (i.e., significant here, but not there). I'm attaching the output. I've mostly fiddled with the SAS syntax to match the SPSS results. I've tried adding the covariates to the class statement, removing the random...
  19. S

    Re-arranging SAS data

    I have data in this format: Admit Gender Department Count Admitted Male A 512 Rejected Male A 313 Admitted Female A 89 Rejected Female A 19 Admitted Male B 353 Rejected Male B 207 Admitted Female B 17 Rejected Female B 8...
  20. A

    frequencies for a year prior for data with dates and frequencies

    I have a data set with two columns; These are the date and the frequency of surgeries on that date. Dates are only listed if the frequency of surgeries on that date was above 0. I'd like to create a third column that gives the total number of surgeries performed within a year prior to the...