Date: Wed, 10 Mar 2010 10:44:18 -0500
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Mike Zdeb <msz03@ALBANY.EDU>
Subject: Re: Proc Format
hi ... the two responses I've seen thus far are all about checking the format you created,
but unless I missed it, you are not even using the format in PROC TABULATE
if I make the variable DELIVER a CHARACTER variable in the following ...
input deliver : $1. @@;
1 2 1 2
proc tabulate data=test;
TABLE deliver* (MEAN STD MIN MAX);
I get the same error that you got ... in the LOG ...
244 proc tabulate data=test;
245 VAR deliver;
ERROR: Variable deliver in list does not match type prescribed for this list.
246 TABLE deliver* (MEAN STD MIN MAX);
so, I don't think that it's the format ... SAMEDAYDELIVERY must be a CHARACTER variable in your data set
and you can't use it in TABLUATE as an analysis variable and compute summary statistics
once you fix that, also fix the format ...
VALUE SameDayDelivery 1 = 'Yes' 2 = 'No';
and then, I guess you want to use it in TABULATE, but I don't see it here in your posting ...
/*Proportion of daily transactions that qualify for same day > delivery*/
proc tabulate data = weekly_sales_revenues f = comma6.;
CLASS LaptopModel ;
VAR SameDayDelivery ;
LABEL SameDayDelivery='Same Day Delivery';
TABLE DateofSale*SameDayDelivery ALL='Total'*LaptopModel all='Total',
( MEAN STD MIN MAX sum='Sold'*f=8. pctsum<SameDayDelivery all>='in %'*f=comma5.1) /box=[label="Daily Transactions"]
U@Albany School of Public Health
One University Place
Rensselaer, New York 12144-3456
> Hello ,
> Could anyone please help me in the code error.I use :-
> PROC Format;
> VALUE $SameDayDelivery 1 = 'Yes'
> 2 = 'No';
> /*Proportion of daily transactions that qualify for same day > delivery*/
> proc tabulate data = weekly_sales_revenues f = comma6.;
> CLASS LaptopModel ;
> VAR SameDayDelivery ;
> LABEL SameDayDelivery='Same Day Delivery';
> TABLE DateofSale*SameDayDelivery ALL='Total'*LaptopModel all='Total',UnitsSold
> *( MEAN STD MIN MAX sum='Sold'*f=8. pctsum<SameDayDelivery all>='in
> /box=[label="Daily Transactions"]
> Error -
> ERROR: Variable SameDayDelivery in list does not match type prescribed
> for this list.
> kindly suggest I need to find the proprtion of the Yes and No in