function run_filter_KF(ME_scale, mhrun, silent, nNamePriorSpec, mData, nFileStrMH, nFileStrFilt)

    time_init_proc=time_ns()
    nPath = pwd()
    rnd_off = 0
    savedir = "$(pwd())/PosteriorDraws/" * nFileStrMH * "/Filtered/"
    loaddir = "$(pwd())/PosteriorDraws/" * nFileStrMH * "/"

    #--------------------------------------------------------------------------
    # Load prior specification
    #--------------------------------------------------------------------------
    include(nPath*"/PriorSpec/" * nNamePriorSpec * ".jl")

    #--------------------------------------------------------------------------
    # Configure data matrix
    #--------------------------------------------------------------------------
    vDate = mData[nStartDate:nEndDate,2]
    mY    = mData[nStartDate:nEndDate,[3,8,4,5]]
    # ygrowth (percent), 100*logcy, infl (annual %), R (annual %)
    println(" Start Date: $(vDate[1])")
    println(" End Date: $(vDate[end])")

    mSigmaMEtilde = [var(mY[:,1]) 0 0 0;
                     0 var(mY[:,2]) 0 0;
                     0 0 var(mY[:,3]) 0;
                     0 0 0 var(mY[:,4]) ];

    mSigmaME     = ME_scale*mSigmaMEtilde;

    #--------------------------------------------------------------------------
    # Load parameters
    #--------------------------------------------------------------------------
    mSummaryDraws = CSV.read(loaddir * nFileStrMH * "_Summary.csv"; datarow=1)
    mSummaryDraws = convert(Array,mSummaryDraws)
    vParameters   = mSummaryDraws[5,:]

    # set options for model Solution
    options_int_use,options_float_use = @eval options()

    #--------------------------------------------------------------------------
    # Prior / Model Solution / State-space Representation / Likelihood
    # at initial parameter value
    #--------------------------------------------------------------------------

    time_init_loop = time_ns()

    # evaluate prior at initial value
    Random.seed!(rnd_off+1)
    nLogPriorDens = fPriorDensity(vParameters,mPriorSpec)

    # solve model and create state-space representation
    sParam            = fCreateParamDict(vParameters)
    sParam_StateSpace = fStateSpaceFormLinear(sParam,options_int_use,options_float_use)

    # initalize output matrix for filtered StateSpace
    Phi10                = sParam_StateSpace["Phi10"];
    ns                   = size(Phi10,1)
    mFilteredStates      = Array{Float64,2}(undef, size(mY,1), ns)
    mFilteredStates_lag  = Array{Float64,2}(undef, size(mY,1), ns)
    mFilteredShocks      = Array{Float64,2}(undef, size(mY,1), 4)
    mReconstructedStates = Array{Float64,2}(undef, size(mY,1), ns-1) # drop y(t-1)
    vReconstructedRegime = Array{Float64,1}(undef, size(mY,1))

    # evaluate likelihood function
    Random.seed!(rnd_off+10+2)
    (lik_i, s_up_stat_i) = fKF(mY, sParam_StateSpace, mSigmaME);
    nLogLiki = sum(lik_i)

    # s_lag_stat_i, shock_stat_i, regime_stat_i,

    # compute objective function at initial value
    nLogPost                 = nLogLiki + nLogPriorDens
    mFilteredStates[:,:]     = s_up_stat_i[:,:]

    # Unpack the Matrices
    vInitS     = sParam_StateSpace["vInitS"];
    pSigmaTE   = sParam_StateSpace["pSigmaTE"];
    pA         = sParam_StateSpace["pA"];
    pA0        = sParam_StateSpace["pA0"];

    pSigmaTE  = sParam_StateSpace["pSigmaTE"];
    pSigmaEta = sParam_StateSpace["pSigmaTE"];

    Phi00        = sParam_StateSpace["Phi00"];
    Phi10        = sParam_StateSpace["Phi10"];
    PhiEta0      = sParam_StateSpace["PhiEta0"];

    # Create data comparable series
    mObsOut = (pA0 .+  pA*mFilteredStates')'

    # Create output level
    vOutput = mObsOut[:,1]
    for iTime = 1:size(vDate)[1]
        vOutput[iTime] = pA0[1]*iTime + 100*sum(mFilteredStates[1:iTime,3]) + 100*sum(mFilteredStates[1:iTime,5]) - 100*sum(mFilteredStates[1:iTime,9])
    end

    mObsOut = [mObsOut vOutput]

    vIntRateLag = [NaN ; (mY[1:end-1,4] .-pA0[4])./400]

    mXStates = [vIntRateLag ones(size(vIntRateLag)[1]) mFilteredStates[:,9] mFilteredStates[:,3] mFilteredStates[:,4] mFilteredStates[:,2] mFilteredStates[:,1]  ]

    savename     = nFileStrFilt * "_XStates" * ".csv"
    CSV.write(savedir * savename,  DataFrame(mXStates), writeheader=false)

    savename     = nFileStrFilt * "_ObsOut" * ".csv"
    CSV.write(savedir * savename,  DataFrame(mObsOut), writeheader=false)

    # output
    savename     = nFileStrFilt * "_Param" * ".csv"
    CSV.write(savedir * savename,  DataFrame(mParameters=vParameters), writeheader=false)

    savename     = nFileStrFilt * "_Data" * ".csv"
    CSV.write(savedir * savename,  DataFrame([mY vDate]), writeheader=false)

    savename     = nFileStrFilt * "_FilteredStates" * ".csv"
    CSV.write(savedir * savename,  DataFrame(mFilteredStates), writeheader=false)

    savename     = nFileStrFilt * "_LogPosterior" * ".csv"
    CSV.write(savedir * savename,  DataFrame(LogPost = nLogPost), writeheader=false)

    # Phi Matrices
    savename     = nFileStrFilt * "_Param_Phi00" * ".csv"
    CSV.write(savedir * savename,  DataFrame(sParam_StateSpace["Phi00"]), writeheader=false)
    savename     = nFileStrFilt * "_Param_Phi10" * ".csv"
    CSV.write(savedir * savename,  DataFrame(sParam_StateSpace["Phi10"]), writeheader=false)
    savename     = nFileStrFilt * "_Param_PhiEta0" * ".csv"
    CSV.write(savedir * savename,  DataFrame(sParam_StateSpace["PhiEta0"]), writeheader=false)



end
