dear all,
how could I make the statistic for the following data?
for example
psn_name, 200001,200002,200003,200004,200005,200006,...,201012
apple, 1,3,4....,9
qwe,3,6,8,....,6
eee,9,6,7,8...,4
....
the psn_name is the name of the company. the variable between 200001 and 201012 is the period from Jan 2000 to Dec 2015. the number is the application each company make in the month.
I would like to make the statistic for the number of application companies made during this period. could you please give me some suggestion?
thanks in advance.
best regards.
Transpose, and all statistical procedures that SAS provides can be applied.
Transpose your data (PROC TRANSPOSE)
PROC MEANS/FREQ should be all you need from that point forward.
@France wrote:
dear all,
how could I make the statistic for the following data?
for example
psn_name, 200001,200002,200003,200004,200005,200006,...,201012 apple, 1,3,4....,9 qwe,3,6,8,....,6 eee,9,6,7,8...,4 ....
the psn_name is the name of the company. the variable between 200001 and 201012 is the period from Jan 2000 to Dec 2015. the number is the application each company make in the month.
I would like to make the statistic for the number of application companies made during this period. could you please give me some suggestion?
thanks in advance.
best regards.
dear Reeza,
thanks for your advice, I have transpose my data,
and now it looks like
apple, microsoft, fff,.....
200001 1, 2, 1
200002 2, 4, 3
...
201012 9, 5, 7
the number is the patent application made by each company per month.
how could I get the statistic results of them?
may I use the
PROC UNIVARIATE data=name;
RUN;
cause there are too many companies in this dataset, may I get the result if I use PROC UNIVARIATE?
many thanks in advance.
I may have missed this somewhere but what do you want as the result?
@France wrote:
dear Reeza,
thanks for your advice, I have transpose my data,
and now it looks like
apple, microsoft, fff,..... 200001 1, 2, 1 200002 2, 4, 3 ... 201012 9, 5, 7
the number is the patent application made by each company per month.
how could I get the statistic results of them?
may I use the
PROC UNIVARIATE data=name; RUN;
cause there are too many companies in this dataset, may I get the result if I use PROC UNIVARIATE?
many thanks in advance.
You probably just want a proc means now.
proc means data=have stackods sum;
var apple--[last variable];
ods output summary=want;
run;
proc print data=want(obs=5);
run;
Dear Reeza,
i just find after I Transpose the old data which like this,
the variable name of the new dataset change as COL1, COL 2...etc.
the company name is listed in the first column. could you give me some suggestion to fix it please ?
Specify the ID variable, either in the GUI or in the code. Did you use an ID statement?
Without seeing your code I have no clue what you did, so I can only respond in generalities. If you need specific solution, you have to include more information, preferably from the start.
please see the private message, I also add the dataset in the attachment. please check if you like.
I responded via PM, but please keep the discussion public. The forum is both to answer your questions but to help future users and taking the discussion private, does not support that.
Dear Reeza, thanks for your reply. I will do this in the future.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.