Max Ghenis has created a version of the example notebook that can be run directly in your browser, via Google Colab. See this notebook to see examples of other calculations, including grouped calculations. # - Output - # marriage_status # Married 0.425 # Never married or under 15 years old 0.421 # Divorced 0.097 # Widowed 0.046 # Separated 0.012 # Name: PWGTP, dtype: float64 distribution( responses, "marriage_status"). # Get the distribution of marriage-status responses calc. # `PWGTP` is the weighting variable used in the ACS's person-level data calc = wc. To create our noise filter we used cv2.randn() to fill the empty matrix dst with random values within a normal distribution, where the mean is 0 and the standard deviation is 20 for each of the 3. read_csv( "examples/data/acs-2015-pums-wy-simple.csv")
Import pandas as pd import weightedcalcs as wc # Load the 2015 American Community Survey person-level responses for Wyoming responses = pd.
an(my_data, value_var): The weighted arithmetic average of value_var.Mina and Xiao (2001) recommend that the lambda decay parameter in the EWMA volatility model be set to 0.97 when using monthly data. Calculator( "resp_weight")Ĭurrently, weightedcalcs.Calculator supports the following calculations: document recommends the use of the Exponentially Weighted Moving Average (EWMA) volatility model.