\Header{prop.trend.test}{Test for trend in proportions}
\keyword{htest}{prop.trend.test}
\begin{Description}\relax
Performs chi-squared test for trend in proportions, i.e., a test
asymptotically optimal for local alternatives where the log odds vary
in proportion with \code{score}.  By default, \code{score} is chosen
as the group numbers.
\end{Description}
\begin{Usage}
\begin{verbatim}
prop.trend.test(x, n, score = 1:length(x))
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] Number of events 
\item[\code{n}] Number of trials 
\item[\code{score}] Group score 
\end{ldescription}
\end{Arguments}
\begin{Value}
An object of class \code{"htest"} with title, test statistic, p-value,
etc.
\end{Value}
\begin{Note}\relax
This really should get integrated with \code{prop.test}
\end{Note}
\begin{Author}\relax
Peter Dalgaard
\end{Author}
\begin{SeeAlso}\relax
\code{\Link{prop.test}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
smokers  <- c( 83, 90, 129, 70 )
patients <- c( 86, 93, 136, 82 )
prop.test(smokers, patients)
prop.trend.test(smokers, patients)
prop.trend.test(smokers, patients,c(0,0,0,1))
\end{ExampleCode}
\end{Examples}

