Most voted "sas" questions
Programming language used by SAS (Statistical Analysis System)
Learn more…14 questions
Sort by count of
-
4
votes2
answers93
viewsDoes R have a similar command to SAS IN?
R has some command similar to SAS IN? Follow an example in SAS code: variable1 IN (4,5,6,7) THEN variable2 = 1; That is, if the variable1 assumes the values from 4 to 7, the variable2 is assigned…
-
3
votes2
answers647
viewsSAS and R run Merge differently
What is the difference between how R and SAS perform merge? The SAS Merge command returns 205546 lines whereas the R command returns 207208 lines. Following example. I am working with the IBGE file…
-
3
votes1
answer1180
viewsHow to use scan for a numeric variable [SAS]
I have a table like this: Lista_id 1 4 7 10 (In total are 100 numbers) I want to call them to a macro that I created. I was trying to do it with Scan, but I read that it was only for text variables.…
-
2
votes2
answers1112
viewsReading Archives in ASCII Census 2010
Does anyone know where to download ASCII (.sas) files for reading the IBGE 2010 Demographic Census microdata ? I know that the Anthony Damico keeps only a few files on his website (see below how to…
-
2
votes1
answer1232
viewsDate input in SAS
Please try to enter dates in various ways by input from SAS Enterprise Guide version 7.1, but anyway the result always comes out in numerical form, follow an example of the code: data work.family;…
-
2
votes2
answers669
viewsBasic SAS ProcMeans for R
Hello, I am a basic SAS user and I need to create a table in R, but I am very lost in R. The command given in SAS is DATA MEDIAS; SET TEMP; PROC MEANS N MEAN MIN MAX STD; VAR a1 a2 b1 b2 c1 c2 T R…
-
1
votes0
answers461
viewsHow to use SAS Enterprise Guide to work with complex samples?
I need to model PNAD data - IBGE, which uses a complex sampling plan. It is possible to use SAS Enterprise Guide in this modeling?
sasasked 9 years, 11 months ago Henrique Pizarro 659 -
1
votes2
answers120
viewsHow to apply a mathematical expression to all columns of a table in SAS?
The expression will be applied to each of the 747 columns of a table/dataset. It follows the expression: (variable - variable average) / (maximum variable value - minimum variable value). Will be…
-
1
votes0
answers36
viewsPenalty matrix in generalized additive models with smoothing through P-splines
I’m studying generalized additive models using the package MGCV of R. Below is an illustrative example for a certain adjustment using the Gam function. library(mgcv) data(mcycle) attach(mcycle)…
-
1
votes1
answer103
viewsHow to search for data from one column in another column in SAS using Proc-SQL?
I need to perform a query in which I have to do a Join between two Tables. The column I should use to do the "On" of Join is the CPF/CNPJ. However, table A’s CNPJ data is only with 12 numbers, while…
-
0
votes1
answer1096
viewsVariable length - SAS
I am making an if in SAS to declare the value that a variable will receive depending on the condition, but when I say that the variable will receive a string of size up to 3 it returns correctly,…
-
0
votes1
answer111
views -
0
votes0
answers6
viewsPython Equivalent to SAS Proc Logistic
all right? Guys, how do I write the following python SAS code? Proc Logistis Data = Name_dataset outmodel Result_dataset; model Var1 / Var2 = Var3 /lackfit; output out = Name_dataset_fit p =…
-
-2
votes2
answers27
viewsHow to concatenate two fields and use as a key for query in SAS sql proc, as is done in the sql snippet of the example?
Good morning I’m a beginner in SAS and I’m having the following difficulty - Transform the snippet of sql code below to the format of proc sql in SAS. The SQL code would look like this: Where…