Date: Thu, 12 Mar 2009 16:51:44 -0500
Reply-To: Joe Matise <snoopy369@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Joe Matise <snoopy369@GMAIL.COM>
Subject: Re: Invalid Argument to PROBIT Problem
In-Reply-To: <509398.10966.qm@web57002.mail.re3.yahoo.com>
Content-Type: text/plain; charset=ISO-8859-1
Can you show your work for the second example (the one that doesn't work)?
What values are you putting in to PROBIT? Typically that error means you
have data that does not fit the function's parameters (ie, not 0<p<1 ) from
my experience...
Do something like
data temp.FC8; merge exp8 exp9
temp.FC7(in=x);
by sid; if x;
*** Exp_mathpr8 is a percentile, properly defined as a numeric;
put exp_mathpr8=;
nce = round(probit(Exp_mathpr8/100)*21.06+50,.1);
put nce=;
run;
I'd also be curious if your merge was causing the problem; I have several
times encountered problems where doing operations while merging produced
unexpected results. Can you try doing the merge and then in a second data
step doing the PROBIT portion?
-Joe
On Thu, Mar 12, 2009 at 4:35 PM, Anthony Pitruzzello <tonypit45@yahoo.ca>wrote:
> Greetings
> All,
>
>
>
> This code
> converts percentile ranks to normal curve equivalents. See output.
>
>
>
> * Test Program to create NCEs from XILs;
>
> %let prefx = SAT10_;
>
> %let suffx = 8;
>
> data cards;
>
> input pr;
>
> &prefx.nce&suffx = round(probit(pr/100)*21.06+50,.1);
>
> cards;
>
> 1
>
> 2
>
> 3
>
> 4
>
> 5
>
> 6
>
> 7
>
> run;
>
> proc print; run;
>
>
>
> produces this output:
>
> SAT10_
>
> Obs pr
> nce8
>
> 1 1
> 1.0
>
> 2 2
> 6.7
>
> 3 3
> 10.4
>
> 4 4
> 13.1
>
> 5 5
> 15.4
>
> 6 6
> 17.3
>
> 7 7
> 18.9
>
>
>
>
>
> This is essentially the same code,
> applied in a program:
>
>
>
> data temp.FC8; merge exp8 exp9
> temp.FC7(in=x);
>
> by sid; if x;
>
>
>
> *** Exp_mathpr8 is a percentile, properly defined
>
> as a numeric;
>
> nce = round(probit(Exp_mathpr8/100)*21.06+50,.1);
>
> run;
>
>
>
> This produces the message: Invalid
> argument to function PROBIT. Can anyone
> figure why the argument in the first instance is valid and in the second
> instance is not?
>
>
>
>
> __________________________________________________________________
> Ask a question on any topic and get answers from real people. Go to Yahoo!
> Answers and share what you know at http://ca.answers.yahoo.com
>
|