I tried ("cou" is 1,2,3,4,5.....; "var" is continuous variable with decimal points):
proc sql;
create table mt as
select cou,
pctl(75, var) as var_p75
from check_1
group by cou;
quit;
But it returns me with multiple rows per cou.
... View more
Hello! I have a question. Soon I will work with some data that are located on a shared fold in the google drive. This dataset is a STATA dataset. How can I import a STATA dataset that is located in google drive? Thank you very much for your help!
... View more
Does anyone know if there exists any function in SAS that resembles the
"lincom" and "nlcom" of STATA?. These functions computes point
estimates, standard errors, significance levels, confidence intervals,
etc. for linear and non linear combinations of previous estimated
parameters. Down here you've got links to descriptions of the functions of STATA
nlcom:
http://www.stata.com/help.cgi?nlcom
Lincom:
http://www.stata.com/help.cgi?lincom
... View more
Hello everybody, fairly new in the world of SAS, a curious person,say, learning in his own time. I am trying to riddle out how to make a successful POST/GET request to REST API using %macro and JSON as the primary payload and then set up a table that tracks a history of past requests and responses. Set this task to myself as it's one of the more common things people aim to do in other languages. Working with APIs. While, it takes me about 10 minutes to write such logic in JS or Python without any headaches, though I cannot string up a working logic in SAS using %macro (a term function could also be used as a synonym I guess?). A non-macro approach clicked using datalines and a hard-coded value as a prompt. I am now well aware that datalines will not budge when using macro logic so I went with put, but still not a single budge. Here's the code that I have managed to jot down so far. The API is crudcrud.com allowing up to 100 free requests. %macro api_post_request(prompt=);
%let api_url=url;
filename json_in temp;
data _null_;
file in;
put "{
""username"":""&prompt""
}"
;
run;
filename resp temp;
proc http method="POST"
url="&api_url
ct="application/json"
in=json_in
out=resp;
headers
"Content-Type"="application/json";
run;
%mend;
%api_post_request(prompt=Player1); Fierce thanks!
... View more