Skip to content

Commit

Permalink
Fix up post-merge type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bos committed Mar 24, 2015
1 parent 882b096 commit 55fc0ba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Statistics/Regression.hs
Expand Up @@ -24,7 +24,7 @@ import Statistics.Function as F
import Statistics.Matrix hiding (map)
import Statistics.Matrix.Algorithms (qr)
import Statistics.Resampling (splitGen)
import Statistics.Resampling.Bootstrap (Estimate(..))
import Statistics.Types (CL(..), Estimate(..))
import Statistics.Sample (mean)
import Statistics.Sample.Internal (sum)
import System.Random.MWC (GenIO, uniformR)
Expand Down Expand Up @@ -117,7 +117,7 @@ bootstrapRegress :: GenIO
-- ^ Regression function.
-> [Vector] -- ^ Predictor vectors.
-> Vector -- ^ Responder vector.
-> IO (V.Vector Estimate, Estimate)
-> IO (V.Vector (Estimate Double), Estimate Double)
bootstrapRegress gen0 numResamples ci rgrss preds0 resp0
| numResamples < 1 = error $ "bootstrapRegress: number of resamples " ++
"must be positive"
Expand All @@ -141,7 +141,7 @@ bootstrapRegress gen0 numResamples ci rgrss preds0 resp0
est x . U.generate numResamples $ \k -> ((coeffsv G.! k) G.! i)
r2 = est r2s (G.convert r2v)
(coeffss, r2s) = rgrss preds0 resp0
est s v = Estimate s (w G.! lo) (w G.! hi) ci
est s v = Estimate s (w G.! lo, w G.! hi) (CL ci)
where w = F.sort v
lo = round c
hi = truncate (n - c)
Expand Down
2 changes: 1 addition & 1 deletion Statistics/Resampling/Bootstrap.hs
Expand Up @@ -41,7 +41,7 @@ bootstrapBCA confidenceLevel sample estimators resamples
where
e est (Resample resample)
| U.length sample == 1 || isInfinite bias =
estimate pt pt pt confidenceLevel
estimate pt (pt,pt) confidenceLevel
| otherwise =
estimate pt ((resample ! lo) - pt, (resample ! hi) - pt) confidenceLevel
where
Expand Down
2 changes: 1 addition & 1 deletion Statistics/Types.hs
Expand Up @@ -160,7 +160,7 @@ getNSigma1 (CL p) = negate $ quantile standard p
data Estimate a = Estimate
{ estPoint :: !a
-- ^ Point estimate.
, estErrors :: !(a,a)
, estErrors :: (a,a)
-- ^ Estimate's error. They are given relative to central estimate.
, estConfidenceLevel :: !(CL a)
-- ^ Confidence level of the confidence intervals.
Expand Down

0 comments on commit 55fc0ba

Please sign in to comment.