06-16-2016 04:59 AM
06-16-2016 06:31 AM
06-16-2016 05:14 AM
(added my own datastep, as I never open Office files from the web)
data have; input country $ fam bdr; cards; JPN 0 5 JPN 0 6 JPN 1 3 JPN 1 4 KOR 0 3 KOR 0 2 KOR 1 4 KOR 1 5 ; run; proc summary data=have; var bdr; class fam; by country; output out=want ( drop=_type_ rename=(_freq_=N) where=(fam ne .) ) mean(bdr)=mean median(bdr)=median max(bdr)=max min(bdr)=min ; run;
06-16-2016 05:28 AM
06-16-2016 05:35 AM
Post your data in a more sensible and less dangerous format (.csv, for instance).
Or import your excel data into SAS and then create a sample dataset, as described in
06-16-2016 05:53 AM
It is easy for proc tabulate.
proc import datafile='/folders/myfolders/22.xls' out=have replace dbms=xls;run; data temp; set have; length F $ 20; if Fam=0 then F='Non-family firms'; else if Fam=1 then F='Family firms'; run; options nobyline; title j=l "Country #byval1"; proc tabulate data=temp; by count; var book_debt_ratio; class F; table F=' ',book_debt_ratio*(N mean median max min); run;
06-16-2016 06:25 AM
when i put the complete data which contain 9 countries than it comes up with this error.
ERROR: Data set WORK.TEMP is not sorted in ascending sequence. The current BY group has Count =
JPN and the next BY group has Count = HKG.
06-16-2016 06:31 AM
06-16-2016 01:21 PM
I want to merge two data's. in both excel files the company name are same i have data for 14 years so i want to merge two files in a sense that company name and data for a particular year apear togather. for example i have stock data for 100 companies for 14 years is in one file and total assets data for those 100 companies for 14 years is another file. how can i merge these two files. both the files contain same companies names and same years. Thanks in anticipation.
06-16-2016 08:29 AM
Add a format to the variable, like this:
proc summary data=have; var bdr; class fam; by country; attrib bdr format=10.4; output out=want ( drop=_type_ rename=(_freq_=N) where=(fam ne .) ) mean(bdr)=mean median(bdr)=median max(bdr)=max min(bdr)=min ; run;
The format will be inherited by the statistics.
Need further help from the community? Please ask a new question.