Sunday, June 30, 2024

The Art and Science of Comparable Sales Analysis (Part 1 of 3)

Part 1 of 3

Comparable sales analysis plays a crucial role in determining a property's value in real estate valuation. However, the traditional approach of making subjective adjustments to comparable sales data tends to raise questions about the reliability of the final value conclusions. To address this challenge, I will use this three-part blog post to delve into a comprehensive methodology that combines statistical rigor with traditional valuation principles to enhance the accuracy and explainability of property valuations.

The post will outline a structured three-step process that redefines comparable sales analysis. The first step involves using a correlation matrix to examine the relationships between property sale prices and six key independent variables. This initial analysis scrutinizes potential collinearity and multicollinearity among these variables, setting the foundation for a more robust regression model.

The second step of the process employs multiple regression analysis to derive consistent coefficients that serve as the basis for an adjustment matrix. This matrix facilitates the systematic adjustment of comparable sales data to accurately align with the subject property's characteristics. By leveraging statistical methods, this approach aims to minimize the subjective nature of adjustments and provide a more objective and reliable valuation model.

Finally, moving beyond the statistical realm, the third step incorporates the art of traditional comparable sales analysis. This aspect involves selecting comparable sales based on criteria such as the least adjustments and sales recency. It emphasizes the importance of applying logic and expertise in identifying genuinely comparable properties, thereby enhancing the accuracy and credibility of the valuation process.

By combining the precision of regression modeling with the artistry of traditional valuation principles, this three-step approach promises to deliver value conclusions that are accurate, transparent, and logical. Through this blog post series, I aim to showcase a more informed and systematic method of conducting comparable sales analysis, ultimately elevating the standards of property valuation practices.

(Click on the image to enlarge)

Dataset and Variables

This dataset, which led to the above correlation matrix, comprises 18 months of home sales data from a particular town, specifically from January 2023 to June 2024, to value the subject properties as of July 1, 2024.

Sale Price will be the dependent variable in the regression model. One of the six independent variables, "Months Since," represents the number of months since the sale. For instance, a sale in January 2023 will receive a value of 18 (July 2024 minus January 2023), while a sale in June 2024 will be assigned a value of 1. The "Exterior Wall" variable has been effect-coded by centering each category's deviation from the town's median sale price. Bldg Age is a synthetic variable calculated by subtracting the property's year built from the prediction year 2024. The other variables are quantitative data obtained from public records. No location variable will be used since all subjects and comps will come from specific neighborhoods within this town.

Analysis

Looking at the correlation matrix, we observe moderate-to-high correlations between Sale Price and the independent variables.

  • A moderate positive correlation (0.4117) between Land SF and Sale Price is expected, as larger lots tend to be associated with higher-priced homes.
  • As expected, a moderate negative correlation (-0.2033) exists between building age and Sale Price, which aligns with the general understanding that older buildings tend to be less expensive than newer ones in the real estate market.
  • A strong positive correlation (0.7780) exists between Heated SF and Sale Price, as expected, since larger buildings tend to fetch higher prices.
  • There is a moderate positive correlation (0.5123) between Bathrooms and Sale Price, as expected.

Multicollinearity

Multicollinearity occurs when two or more independent variables in a regression model are highly correlated, leading to unstable and unreliable coefficient estimates.

Therefore, when assessing multicollinearity, we are concerned with correlations among the independent variables, not with their correlations with the dependent variable (Sale Price in this case).

Here's how to assess multicollinearity among independent variables:

1. Look for correlations exceeding 0.8, a general guideline for strong correlation.

2. Pay attention to the overall pattern in the correlation matrix. The presence of multiple highly correlated independent variables is a strong indicator of multicollinearity.

Examining the correlation matrix, we can see that there are some moderate correlations among the independent variables:

  • Land SF and Heated SF (0.4659)
  • Heated SF and Bathroom (0.6174)

The strongest correlation among independent variables is between Heated SF and Bathrooms (0.6174), which is moderate and not a cause for concern.

It's important to note that there is no one-size-fits-all answer to dealing with multicollinearity. The best approach will depend on your specific data and research question, allowing you to choose the method that best suits your needs.

Important to Know

Here are some ways to address multicollinearity:

  • Drop one of the highly correlated variables: This is a simple solution, but it can also remove valuable information from the model. Before dropping a variable, carefully consider which variable is less critical to your analysis.
  • Combine the correlated variables into a single variable: If the correlated variables represent the same underlying concept, you can create a new variable that combines them. For example, you could create a new variable for the house's square footage (Heated SF + basement SF).
  • Use Ridge Regression: This regression technique can reduce the impact of multicollinearity on model coefficients.

It is important to note that multicollinearity may still be a concern even if correlation coefficients are not extremely high, especially in small sample sizes. In such a scenario, it would be advisable to proceed with fitting the regression model and checking additional diagnostics, such as variance inflation factors (VIFs), to further assess multicollinearity and ensure the stability of the regression estimates.

Conclusion

Examining the correlation matrix before running a regression model is a common and beneficial practice. This preliminary step offers several advantages:

  • Understanding variable relationships: The correlation matrix reveals the strength and direction of relationships between the dependent variable (e.g., Sale Price) and each independent variable, as well as among the independent variables. This information helps analysts identify which independent variables are the most significant predictors of the target variable.
  • Identifying potential multicollinearity: Multicollinearity arises when independent variables are highly correlated, which can complicate the interpretation of regression coefficients and lead to inaccurate results. The correlation matrix helps identify potential multicollinearity, which can be further investigated with tests such as the Variance Inflation Factor (VIF).
  • Variable selection: While correlation alone shouldn't be the sole criterion for choosing variables, it is a helpful starting point. Strong correlations between independent variables and the dependent variable suggest they might be significant predictors for inclusion in the model.
  • Guiding further analysis: The correlation matrix can highlight unexpected relationships or outliers that warrant further investigation, leading to a more nuanced understanding of the data and potentially improving the final regression model.

In conclusion, examining the correlation matrix is a simple yet powerful technique for gaining valuable insights into the data before running a regression model. This preliminary analysis helps build a stronger foundation for the analysis and potentially avoids issues with multicollinearity or misleading results.

Coming Soon: Part 2 of 3 – Regression modeling to help develop the adjustment matrix.

Sid's Bookshelf: Elevate Your Personal and Business Potential

Monday, June 24, 2024

Book: Mastering Mass Appraisal Modeling: A Hands-On Guide with Real-World Data

Link to the Kindle version

Book Summary

As a professional in the field of mass appraisal, I have spent years analyzing data, building models, and refining techniques to accurately determine property values. Throughout my career, I have encountered various challenges and obstacles that have shaped my approach to mass appraisal modeling. These experiences and insights have inspired me to write this book, " Mastering Mass Appraisal Modeling: A Hands-On Guide with Real-World Data."

The idea for this book was born of a desire to provide a comprehensive resource for analysts and researchers in the mass appraisal industry who seek to enhance their skills and develop more accurate valuation models. Drawing upon my years of experience and expertise in the field, I have carefully structured this book to guide readers through the essential steps of building a regression-based mass appraisal model.

Each of the twelve chapters in this book is designed to cover a specific aspect of mass appraisal modeling in detail. From understanding the different types of variables to fine-tuning the model and conducting detailed analyses of sales ratios, each chapter delves into a critical component of the modeling process. I have drawn on actual sales data from various counties to provide practical examples and case studies that bring the concepts to life and illustrate their application in real-world scenarios.

One key challenge in mass appraisal modeling is effectively handling binary and categorical variables. In this book, I discuss techniques such as one-hot and effect coding that can be used to encode these variables and ensure that they are appropriately incorporated into the model. I also address the importance of deriving a representative sales sample, adjusting sale prices for time, and accounting for fixed and location effects to improve the accuracy of the valuation model.

Throughout the book, I emphasize the importance of data analysis and interpretation. From regression modeling and residual analysis to identifying and removing outliers using Z-scores, each step in the modeling process is accompanied by detailed explanations, data tables, statistical outputs, summaries, charts, and graphs that facilitate a deeper understanding of the concepts and techniques.

In addition to discussing the technical aspects of mass appraisal modeling, I have included practical guidance on applying the model to holdout samples and the population, conducting horizontal and vertical assessment equity analysis, and meeting the International Association of Assessing Officers (IAAO) guidelines tests for Mean Absolute Deviation (MAD), Coefficient of Dispersion (COD), and Price-related Differential (PRD). These guidelines are essential for ensuring the accuracy and reliability of the valuation model.

To further assist readers in implementing the techniques and concepts discussed in this book, I have included Excel steps and SAS codes at the end of each chapter. These practical tools can be used to apply the methodologies to real-world data and enhance the learning experience.

In writing this book, I aim to provide a comprehensive and practical guide that equips readers with the knowledge and skills needed to excel in mass appraisal modeling. Whether you are an experienced analyst looking to refine your techniques or a researcher seeking to build accurate valuation models, this book will be valuable in advancing your understanding of mass appraisal modeling.

I am thrilled to share my insights and experiences with you in this book, and I hope it inspires you to explore new approaches and techniques in your work. I invite you to dive into the chapters, engage with the material, and embark on a journey toward mastering mass appraisal modeling.

-Sid

Sid's Bookshelf: Elevate Your Personal and Business Potential

Saturday, June 15, 2024

Understanding Random Residuals in Linear Regression: A Visual Analysis

Target Audience: New Analysts

In linear regression analysis, residuals are the difference between the observed values of the dependent variable and the values predicted by the regression model.

The concept of residual randomness can be understood as the absence of discernible patterns, trends, or correlations in the residuals. The residuals should be scattered around the regression line with no systematic deviations from zero. When the residuals exhibit randomness, it indicates that the model has captured all the available information, and any unexplained variability is due to random chance, making the model more reliable.

Having random residuals is essential for several reasons:

1. If the residuals show patterns or trends, the model is not capturing all the essential underlying relationships in the data. Non-random residuals suggest that the model is missing critical explanatory variables or that the relationship between the variables is nonlinear.

2. Random residuals are a vital assumption in linear regression that enables valid statistical inference. If the residuals are not random, then the estimates of the coefficients, standard errors, and hypothesis tests can be biased or invalid.

3. A regression model with random residuals is more likely to provide accurate predictions for new data, as it does not make systematic errors in predicting the dependent variable.

4. Checking for the randomness of residuals is an essential diagnostic tool in regression analysis. By examining the residuals for patterns or trends, analysts can identify potential problems with the model and make necessary adjustments.

In summary, ensuring that the residuals in a linear regression model are random is crucial for its accuracy, reliability, and validity. It allows analysts to draw sound inferences, make robust predictions, and ensure that the model appropriately captures the relationships in the data.

Homoscedasticity

The concept of random residuals in linear regression is related to homoscedasticity. Homoscedasticity refers to the assumption that the variance of the residuals is constant across all levels of the independent variables. In other words, there should be no systematic patterns in the variability of the residuals as the independent variables' values change.

The residuals are considered homoscedastic when they exhibit constant variance and show no patterns or trends. This means that the variability of the residuals is random and does not depend on the values of the independent variables, a desirable property in regression analysis.

Having homoscedastic residuals is essential for the validity and reliability of the regression model. If the residuals exhibit heteroscedasticity (where the variance of the residuals is not constant), this can lead to biased parameter estimates, incorrect standard errors, and invalid hypothesis tests. Consequently, ensuring that the residuals are homoscedastic is crucial for making accurate inferences and predictions using the regression model.

Testing the Randomness of Residuals

Analysts can create a scatter plot with the residuals on the y-axis and the predicted values from the regression model on the x-axis to test the randomness of residuals in linear regression. Each point on the plot represents a data point in the dataset, with the x-coordinate being the predicted value and the y-coordinate being the corresponding residual.

Analysts can visually inspect whether the residuals exhibit any systematic pattern or trend by examining this scatter plot. A random scattering of points around the horizontal line at y=0 would indicate that the assumption is likely satisfied in the regression model. Conversely, if a clear pattern or structure is observed in the plot, it suggests a violation of the assumption.


Analysis of the Plot

The random scatter of the residuals from the regression model around the horizontal axis (predicted prices) suggests that the errors are independent and identically distributed (homoscedastic), meeting one of the assumptions of linear regression.

An R-squared of 0.000 further supports this, indicating no correlation between the residuals and the predicted values. This is ideal, as it suggests that the model has captured all the linear relationships in the data, and the residuals are just random noise. The fact that the residuals are scattered around zero indicates that there is no systematic bias in the model. In other words, the model is not consistently over- or underestimating the actual home values.

The residual plot suggests that the model is on the right track. However, it is important to remember that this is just one step in the model development process. To assess its generalizability, it is important to evaluate the model's performance on a hold-out set (data not used to build or train the model).

Attention Mass Appraisal Analysts: A few outliers exist, especially at the higher end of the predicted prices. Therefore, while the residual plot passes the test, it would be prudent for the in-house data team to investigate these outliers and document their findings. The findings should be included in the model’s final documentation as an appendix.

Central Limit Theorem (CLT)

The Central Limit Theorem (CLT) is a crucial statistical concept that explains large samples' average (mean) behavior. This regression analysis was conducted using a large sample of 11,224 sales. Due to the large sample size, CLT ensures that even with inherent variability in real estate prices, the residuals will tend toward a normal distribution, indicating randomness and implying that deviations from the predicted prices (residuals) occur by chance and are not due to any systematic pattern or bias in the model. The minor deviations often observed in residuals (e.g., skewness and kurtosis) are likely due to real-world data not being perfectly normal. However, with such a large modeling dataset, the CLT suggests that these deviations are likely insignificant and that the residuals can be considered random.

Sid's AI-Assisted Bookshelf: Elevate Your Personal and Business Potential

Sunday, June 9, 2024

Book: A Beginner's Guide to Automated Valuation Modeling (AVM): Step-By-Step Demonstration of Model Development with Real-World Data and Numerous Illustrations

Link to the Kindle version

Book Summary:

The housing market is a complex ecosystem where accurate property valuation is paramount for various stakeholders. For lenders, investors, appraisers, assessors, and even homeowners, understanding a property's true value is crucial for informed decision-making. This is where Automated Valuation Models (AVMs) come into play.

A Revolution in Real Estate Valuation

AVMs have revolutionized the way we approach property valuation. These sophisticated statistical models leverage data and algorithms to estimate a property's market value. They offer a faster, more cost-effective alternative to traditional appraisals, making them invaluable tools in today's dynamic market.

A Beginner's Guide: Your Roadmap to AVM Mastery

This book, "A Beginner's Guide to Automated Valuation Modeling (AVM): Step-By-Step Demonstration of Model Development with Real-World Data and Numerous Illustrations," is designed to be your comprehensive guide to understanding and building AVMs. Whether you are a real estate professional, a data enthusiast, or simply someone curious about the inner workings of property valuation, this book equips you with the necessary knowledge and skills to navigate the world of AVMs.

A Step-by-Step Journey

Divided into ten comprehensive chapters, the book takes you through the essential stages of AVM development step-by-step. You will delve into the various types of variables influencing property value: continuous, binary, discrete, categorical, and ratio. The book guides you through effective encoding techniques like one-hot and effect coding, empowering you to transform categorical data into a format usable by the AVM model.

Building a Robust AVM

One of the most crucial aspects of AVM development is data preparation. This book equips you with the knowledge to derive a representative sales sample, a critical component for building a reliable model. You will learn about time-value adjustments to ensure your model accounts for market fluctuations over time.

Addressing Challenges: Location, Correlation, and Outliers

The book acknowledges the challenges inherent in AVM development, including the need to incorporate fixed neighborhood and location surfaces. You will be introduced to techniques for addressing multicollinearity, a phenomenon in which highly correlated variables can lead to inaccurate model results. The book also equips you with the skills to identify and remove outliers using Z-scores, ensuring your model is not skewed by atypical data points.

Fine-Tuning and Validation

No AVM is perfect, and the book emphasizes the importance of fine-tuning your model for optimal performance. You will learn about the intricacies of regression modeling and residual analysis, empowering you to assess and improve your model's accuracy.

Putting Your AVM to the Test

The book doesn't stop at model development. You will explore the crucial model validation step by applying the AVM to holdout samples and to the broader population to assess its generalizability. This ensures your model can accurately estimate property values beyond the data used to create it.

Beyond the Basics: Sales Ratios and Practical Applications

This book goes beyond the foundational aspects of AVM development. It delves into detailed analyses of sales ratios, a valuable tool for understanding market trends and property valuation. Furthermore, the book equips you with the practical skills to apply your AVM to real-world scenarios, giving you the confidence to utilize your model effectively.

Learning by Doing: Excel and SAS Code Integration

The book incorporates practical exercises to solidify your understanding. Each chapter concludes with Excel steps and SAS codes, allowing you to replicate the AVM development process using real data. This hands-on approach reinforces your learning and empowers you to build your AVMs.

Data Tables, Charts, and Visual Learning

This book understands the power of visual communication. Each chapter is enriched with data tables, statistical outputs, summaries, charts, and graphs. This visual approach aids in comprehension, making complex concepts easier to grasp and retain.

A Valuable Resource for All

Whether you are a seasoned professional or just starting your journey in real estate valuation, this book is a valuable resource. It provides a clear, concise, and practical guide to understanding and building AVMs. With its step-by-step approach, real-world data examples, and practical exercises, this book empowers you to confidently navigate the fascinating realm of automated valuation modeling.

Embrace the Future of Property Valuation

AVMs are transforming the way we approach property valuation. By equipping yourself with the knowledge and skills outlined in this book, you are positioning yourself as part of this exciting revolution. Let this book be your guide as you embark on your journey toward mastering the art of automated valuation modeling.

Sid's AI-Assisted Bookshelf: Elevate Your Personal and Business Potential

Wednesday, June 5, 2024

Representative Sales Sampling: The Not-So-Secret Ingredient of AVM Success

Target Audience: New Graduates/Analysts

When constructing an AVM, it's of utmost importance that the sales sample used in modeling accurately mirrors the population from which it's derived. This accuracy is a key factor in the AVM model's reliability. To achieve this, analysts can employ several methods:

1. Random Sampling: Analysts can use random sampling techniques, ensuring that each property in the population has an equal chance of being included in the sample. This reduces bias and ensures a more representative sample, giving them confidence in the data they are working with.

2. Stratified Sampling: If the population can be divided into different strata (such as different property types or locations), stratified sampling can be used to ensure that each stratum is represented proportionally in the sample.

3. Cluster Sampling: In cases where the population is divided into clusters (such as neighborhoods), they can use cluster sampling to select clusters randomly and include all properties within those clusters in the sample.

4. Weighting: They can apply weighting techniques to adjust the influence of different properties in the sample to better reflect the overall population, which is particularly useful when specific population segments are underrepresented in the sample.

5. Validation and Calibration: They can validate the AVM by comparing the model's estimates to actual sales prices for a separate set of properties. The model can then be calibrated to improve its accuracy and ensure validity when significant discrepancies arise.

Employing these techniques and ensuring that the sales sample represents the population can help analysts create a more robust and reliable model.

Data Selection and Stratification

Geographic location: The sample should reflect the population's geographic distribution, which is especially important when property values vary significantly across areas.

Property characteristics: Analysts should choose a sample that includes properties with characteristics similar to those of the population of interest, including factors such as land and building sizes, age, property type, and amenities, which can be achieved by categorizing the data based on these characteristics and ensuring that each category is proportionally represented in the final sample.

Time: Analysts must ensure that the data used to create the sales sample reflects current market conditions, choose a specific timeframe that represents a stable market, or consider making time-series adjustments. 

Sample Size: The sample size should be large enough to provide reliable estimates of property values, which depend on the model's complexity and data variability. 

By following these steps, analysts can increase the likelihood that the sales sample used in an AVM accurately represents the population from which it is derived, resulting in more accurate property valuations.

Example

Splitting a Sales Sample between Modeling (80%) and Holdout (20%) Samples

Dataset

Since an AVM will be developed using a sample of 11,767 home sales from a specific county, it is statistically necessary to divide the sample into modeling and holdout sets, with an 80%/20 % split. The table above displays the median sale prices and other key independent variables for both samples and the original (pre-split) sample.

Analysis

Analysts need to consider whether there are discernible patterns or biases in the data distribution between the modeling and holdout samples to assess the randomness of the split. In this case, the split has been implemented to maintain the overall characteristics of the entire dataset.

1. Count: The count of observations in the modeling and holdout samples reflects the intended 80-20 split, which suggests that the split was executed as planned without any noticeable bias.

2. Sale Price: The median sale prices in the modeling and holdout samples, $395,000 and $394,500, respectively, are remarkably close to each other and to the pre-split dataset's median. This negligible difference, likely due to random chance, indicates that the split has not significantly altered the sale price distribution between the two samples.

3. Land SF, Bldg Age, Living SF, Other SF, and Bath Count: The median values of independent variables such as Land SF, Bldg Age, Living SF, Other SF, and Bath Count in the modeling and holdout samples closely mirror those of the pre-split dataset. This similarity, particularly the identical square footage and building age, underscores the split's success in maintaining similar distributions of these variables in both samples.

As for the effectiveness of the split, an 80/20 split is a commonly used ratio in the AVM world. In this case, it provides a good balance between having enough data for developing the model (modeling sample) and having enough data to evaluate the model's performance (holdout sample).

In conclusion, the split is random and effective. It maintains the dataset's overall distribution and characteristics in both the modeling and holdout samples, enabling the development of a robust, accurate AVM model that can be validated on the holdout sample.

Sales Sampling in Mass Appraisal

Analysts should carefully consider the implications of using stratified or cluster sampling when developing an AVM to generate a countywide assessment roll to ensure fairness and equity. While these sampling techniques can help ensure a more representative sample and improve the model's accuracy, they can also introduce breaks in values along the stratification or cluster lines, such as towns or neighborhoods within the county.

When creating a countywide assessment roll, breaks in values along stratification or cluster lines may not be desirable, potentially leading to inconsistencies or disparities in property assessments within the same jurisdiction. This, in turn, can potentially result in unfair treatment or unequal tax burdens for property owners in different areas, a situation we all strive to avoid.

Therefore, analysts may need to balance the benefits of using stratified or cluster sampling to achieve a more representative sample with the need to maintain fairness and equity in the assessment roll. They may need to carefully evaluate the potential impact of these sampling techniques on the overall assessment results and consider alternative sampling approaches or weighting methods to address breaks in values along stratification or cluster lines, while still ensuring accuracy and fairness in the assessment roll.

Ultimately, the goal should be to develop an AVM that provides accurate property values while maintaining fairness and equity in the assessment process, taking into account the unique characteristics and challenges of the local jurisdiction.

Sales Sampling in the Private Sector

In the private sector, particularly for AVM vendors or companies focused on developing automated valuation models for commercial purposes, the primary goal is often to produce the most accurate property values possible. In this context, the vendor may prioritize accuracy and modeling performance over concerns about value breaks along a county's stratification or cluster lines.

Therefore, private-sector AVM vendors may use stratified or cluster sampling techniques to develop their models. These methods often lead to more precise and reliable valuations by ensuring a more representative population sample. By using these sampling techniques, the model can capture nuances and variations in property values across market segments, leading to more accurate assessments overall.

While the focus in the private sector may lean toward accuracy and model performance, AVM vendors need to be transparent about their sampling methods and the potential implications of breaks in values across stratification or cluster boundaries. Additionally, vendors should strive to continuously validate and refine their models to ensure they are providing reliable and fair property valuations that meet the needs of their clients and stakeholders.

Ultimately, the decision to use stratified or cluster sampling for AVM development in the private sector may depend on the vendor's specific objectives and the desired balance among accuracy, fairness, and market representation in the valuation process.

Crossover – When a Private Vendor Sells to the Public Sector

Suppose a private AVM vendor contracts to sell values to a County Assessor to assist in producing an assessment roll. In that case, it may be beneficial for the vendor to recalibrate its model using a top-line representative random sample. Recalibrating the model ensures that the AVM's estimates align more closely with the specific market conditions and property characteristics in the county for which the assessment roll is being generated.

Using a top-line, representative random sample, the AVM vendor can play a crucial role in addressing potential issues related to bias or inaccuracies in the original model that may have arisen from different data sources or methodologies. With this recalibration using a representative sample specific to the county where the assessment roll will be used, the AVM vendor can significantly enhance the accuracy and reliability of the property valuations provided to the County Assessor, making the County Assessor feel valued for their contribution.

Additionally, recalibrating the model allows the vendor to tailor the AVM's estimates to reflect the local real estate market's unique characteristics and trends, improving the relevance and usefulness of the valuation results for assessment purposes.

Collaboration is Key

The AVM vendor and County Assessor, both key players in this process, can collaborate to ensure the recalibration process is effective. This would benefit not only the AVM model but also the accuracy of property assessments.

Sharing Data: The County Assessor may have access to additional data on property characteristics and sales that could improve the randomness and representativeness of the sample.

Transparency: The vendor should be transparent about their sampling methods and the potential for bias in their original model, allowing the assessment staff to assess the need for recalibration and its effectiveness.

Overall, recalibrating the AVM model using a top-line representative random sample can help ensure that the property values generated by the AVM align with the County Assessor's specific needs and requirements and contribute to producing a fair and accurate assessment roll.

Using Artificial Intelligence (AI) in Sales Sampling

Artificial Intelligence (AI) can play a crucial role in ensuring that the modeling sales sample used in an AVM represents the population it derives from in both the private and public sectors. Here are some ways in which AI can help achieve a more representative sales sample:

1. Advanced Sampling Techniques: AI algorithms can optimize sampling techniques, such as random sampling, stratified sampling, or cluster sampling, to ensure that the sales sample is representative of the population. AI can help identify patterns in the data and select sample points that reflect the diversity of the overall population.

2. Feature Selection: AI can assist in identifying the most relevant features or variables to include in the sales sample, ensuring that the selected properties capture the key characteristics of the population. Feature selection algorithms can help prioritize variables that have the most significant impact on property values.

3. Data Quality Assessment: AI can analyze the quality of the data used in the sales sample, identifying and addressing any biases, errors, or missing values that could impact the sample's representativeness. AI algorithms can flag data inconsistencies and suggest corrective actions to improve data quality.

4. Model Validation and Calibration: AI can be used to validate AVM models against actual sales data and adjust model parameters through calibration to improve accuracy and ensure that the model reflects the population's actual characteristics. This iterative process helps refine the AVM and enhance its representativeness.

5. Dynamic Sampling Strategies: AI can enable dynamic sampling strategies that adapt to changes in the real estate market or population characteristics over time. By continuously monitoring data trends and adjusting the sampling approach accordingly, AI can help maintain the relevance and representativeness of the sales sample.

6. Fairness and Bias Mitigation: AI can be leveraged to detect and mitigate biases in the modeling sales sample, ensuring that the sample is fair and equitable. Fairness-aware machine learning algorithms can help address bias issues and promote inclusivity in the sample selection.

By incorporating AI-driven approaches into sampling, data processing, model optimization, and validation, AVMs in the private and public sectors can enhance the representativeness of the sales sample used in modeling, leading to more accurate and reliable property valuations that better reflect the target population's characteristics.

Sid's AI-Assisted Bookshelf: Elevate Your Personal and Business Potential

Thursday, May 30, 2024

The Art of Encoding Categorical Variables in an Automated Valuation Model (AVM)

Target Audience: New Graduates/Analysts

Dummy Coding, Effects Coding, and One-Hot Coding

Dummy encoding is used to avoid perfect multicollinearity in a regression model, a phenomenon also known as the dummy variable trap. This occurs when one dummy variable can be perfectly predicted from the others. For example, if you have three dummy variables for Town A, Town B, and Town C, the variable for Town D can be inferred when all three are 0. This can lead to issues in estimating the model coefficients. Dummy encoding handles this by using one fewer dummy variable than the total number of categories, with one category serving as the baseline or reference.

Dummy coding and effects coding both use binary variables to represent categorical data in a regression model, but they differ in how they define the baseline or reference group. In dummy coding, the baseline group is represented by a set of zeros for all dummy variables. In effects coding, the baseline group is represented by a set of -1s. So you are correct.

How Dummy Coding and Effects Coding Differ

Dummy Coding

In dummy coding, if you have five towns (let's say A, B, C, D, and E), you'd create four dummy variables (Town B, Town C, Town D, and Town E) with Town A as the baseline.

·        A house in Town A would be coded as (0,0,0,0).

·        A house in Town B would be coded as (1,0,0,0).

·        A house in Town C would be coded as (0,1,0,0).

·        A house in Town D would be coded as (0,0,1,0).

·        A house in Town E would be coded as (0,0,0,1).

The coefficient for Town B would represent the difference in the dependent variable between Town B and Town A. The intercept would represent the mean of the dependent variable for the baseline group, Town A.

Effects Coding

In effects coding, with the same five towns, you would also create four dummy variables. However, the coding for the baseline group differs.

·        A house in Town A would be coded as (−1,−1,−1,−1).

·        A house in Town B would be coded as (1,0,0,0).

·        A house in Town C would be coded as (0,1,0,0).

·        A house in Town D would be coded as (0,0,1,0).

·        A house in Town E would be coded as (0,0,0,1).

In this case, the coefficient for Town B would represent the difference between the mean of Town B and the grand mean of all towns. The intercept would represent the grand mean of the dependent variable for all towns combined.

In both dummy coding and effects coding, the reference or baseline group is not directly included in the regression equation as a separate variable.

The reason is to avoid multicollinearity, a phenomenon known as the "dummy variable trap." If you were to include a variable for all five towns, the fifth variable would be perfectly predictable from the other four. For example, if a house is not in towns A, B, C, or D, it must be in town E. This perfect linear relationship between the variables makes it impossible for the regression model to uniquely estimate the coefficients for each variable.

How the Baseline is Accounted For

Even though the baseline group isn't explicitly in the equation, its information is implicitly included through the intercept and the interpretation of the other coefficients.

Note: "Effects Coding" and "Effect Coding" are often used interchangeably, and both are generally understood to refer to the same statistical method. However, "Effects Coding" is the more common and technically precise term used in academic literature and statistical software documentation.

The name "Effects Coding" is derived from the fact that it measures the "effect" of each group relative to the overall grand mean of all groups. In a balanced design (equal sample sizes in all groups), the intercept represents this grand mean. The coefficients for the dummy variables represent the deviation of each group's mean from the overall grand mean.

Key Takeaway

·        Effects Coding: This is the most widely accepted and formal name.

·        Effect Coding: While technically less common, it is also frequently used and understood in the same context.

One-hot encoding, on the other hand, creates a binary variable for each category.

To use one-hot encoding for the four towns in a regression model, you'll create four separate binary variables, one for each town. Each observation will have a 1 in the column corresponding to its town and a 0 in the other three town columns.

While this approach introduces multicollinearity if all one-hot encoded variables are included in the model along with an intercept, it can be handled in a few ways:

·        Dropping one of the one-hot encoded variables. This effectively makes the model identical to dummy coding, with the dropped variable serving as the reference category.

·        Omitting the intercept from the model. If you use all four one-hot encoded variables but remove the intercept, the model can still be estimated. In this case, each coefficient represents the average house price for that specific town. This approach is less common in standard regression analysis but is a valid alternative.

For a regression model, omitting the intercept would make the coefficients directly interpretable as the average price for each town, all else being equal. However, if you are also including other variables, such as square footage, the coefficients would represent the effect of being in that town, holding other variables constant, relative to a baseline of zero for the other towns. This interpretation can be less intuitive than the standard approach of using a reference category.

Therefore, most regression practitioners prefer to drop one dummy variable and include an intercept.

Sunday, May 26, 2024

The Role of Quantitative Variables in Automated Valuation Modeling (AVM)

Target Audience: New Graduates/Analysts

In statistics, a quantitative variable is a variable that can be measured and compared in magnitude. The three main types of quantitative variables are continuous, ratio, and discrete.

Continuous variable: A continuous variable can take any numerical value within a range. For example, in an AVM, the sale price is a continuous variable because it can take on any value within a specific range, such as $100,000 or $200,000. This variable type helps measure variation and compares different values along a continuum.

Ratio variable: A ratio variable, like the adjusted sale price per square foot (SP/SF), is a powerful tool in property valuation. It has a true zero point, meaning that a value of zero indicates the absence of the measured quantity. This precision enables meaningful comparisons of ratios and proportions, enhancing the accuracy of property valuation.

Discrete variable: A discrete variable, such as the median monthly sale prices, is a versatile tool in property valuation. It takes on specific numerical values that are separate and distinct from one another, allowing for counting and representing categories or events. This versatility makes it adaptable to various property valuation scenarios.

In an AVM, using these three types of quantitative variables – sale price (continuous), SP/SF (ratio), and median monthly sale prices (discrete) – will help capture different aspects of the housing market in a specific county. By incorporating these variables, analysts can provide a more comprehensive and accurate valuation of properties based on various metrics and factors.

Continuous vs. Ratio Variable

Suppose you are developing an AVM for a specific county with arms-length sales from the recent nine quarters. Before starting the regression modeling, you must understand the nuances of the adjusted sale price in raw and normalized (SP/SF) forms. Here is how to compare and contrast their statistical measures.

1. Mean:

  • Adjusted Sale Price Mean: $436,481
  • SP/SF Mean: $218.99

Comparison: The mean provides the average value of the data. It is a central measure that can help understand the general value of properties in the dataset.

Contrast: While the adjusted sale price gives an overall average value for properties sold, the SP/SF mean provides a value standardized by property size. This can help in comparing properties of different sizes.

2. Standard Error:

  • Adjusted Sale Price Standard Error: $1,415
  • SP/SF Standard Error: $0.44

Comparison: The standard error indicates the variability or uncertainty in the mean estimate. A smaller standard error suggests a more precise estimate.

Contrast: The standard error for adjusted sale price and SP/SF helps assess the reliability of the mean estimates. Understanding the accuracy of the valuation predictions is particularly important in AVMs.

3. Median:

  • Adjusted Sale Price Median: $401,962
  • SP/SF Median: $214.26

Comparison: The median represents the middle value of the dataset when arranged in order. It is a robust measure that is not affected by extreme values.

Contrast: Using the median alongside the mean provides a more complete picture of the data distribution. It can help identify any skewness or outliers that may affect the valuation model.

4. Mode:

  • Adjusted Sale Price Mode: $381,196
  • SP/SF Mode: $194.89

Comparison: The mode is the most frequently occurring value in the dataset. Understanding common pricing trends can be useful.

Contrast: While the mean and median provide central measures, the mode offers insight into the most common price points. This information can be valuable in identifying pricing patterns and preferences in the housing market.

5. Standard Deviation:

  • Adjusted Sale Price Standard Deviation: $153,531
  • SP/SF Standard Deviation: $48.26

Comparison: The standard deviation measures the dispersion of the data points around the mean. A higher standard deviation indicates greater variability in the dataset.

Contrast: Understanding the standard deviation for both adjusted sale price and SP/SF helps assess the spread of property values and can aid in determining the level of risk associated with valuation estimates.

6. Kurtosis:

  • Adjusted Sale Price Kurtosis: 1.02213
  • SP/SF Kurtosis: 9.4649

Comparison: The kurtosis value for the adjusted sale price is around 1.02213, indicating a normal distribution with moderate tail heaviness.

Contrast: However, the SP/SF kurtosis value of 9.4649 suggests a highly peaked distribution or heavy tails, indicating a departure from normality and the potential presence of outliers or extreme values.

7. Skewness:

  • Adjusted Sale Price Skewness: 1.10514
  • SP/SF Skewness: 1.8910

Comparison: Both the adjusted sale price and SP/SF skewness values are positive, indicating right-skewed distributions where the tail is on the right side of the peak.

Contrast: The skewness values suggest that the data is skewed toward higher values, with the SP/SF distribution exhibiting slightly higher skewness than the adjusted sale price.

In essence, each of these statistical measures provides valuable insights into the distribution, variability, and central tendencies of the property values in the dataset. By accounting for different aspects of the data distribution, incorporating these measures in an AVM can enhance the accuracy and reliability of the valuation predictions.

Important to Understand

Analyzing the sale price per living square foot (SP/SF) as a normalized ratio can provide additional insights and a more meaningful perspective in understanding the local housing market for several reasons:

1. Standardization: SP/SF makes comparing properties of differing sizes easier. This allows for a more direct comparison (apples-to-apples) based on the property's value relative to its size.

2. Fair Comparison: SP/SF provides a fair comparison between properties of different sizes. This can help evaluate the value propositions of properties, irrespective of their size.

3. Market Analysis: SP/SF can help identify trends in pricing per unit area over time. It can reveal whether there are specific patterns in how prices change based on property size, which can be valuable for market analysis.

4. Understanding Value: Analyzing the SP/SF can provide insights into the value buyers place on living space. It can help understand preferences for larger or smaller properties and their corresponding price points.

5. Property Valuation: SP/SF is a standard metric real estate professionals use for appraisals and property valuation purposes. It allows for a standardized approach to assessing property values.

However, it's important to note that while SP/SF offers several advantages, it should not be the sole metric for analyzing the local housing market. Raw sale prices may still be relevant, especially when considering other factors such as location, amenities, market conditions, and property features. Both metrics provide valuable insights, and a comprehensive analysis should consider both normalized and raw prices to understand the local housing market.

Discrete Quantitative Variable

A discrete variable is a quantitative variable that can take on a finite number of distinct and separate values; for instance, if we have the median sale prices for each month from January to December, each month (e.g., January, February, March, etc.) represents a discrete value for the median sale price.

These values can be measured, counted, and analyzed numerically, thereby meeting the criteria for a discrete quantitative variable.

The variable doesn't exist on a continuous spectrum. There aren't "in-between" months or quarters, so one can't have a 1.3rd quarter or July and a half. There are distinct categories (months or quarters) with clear boundaries. Even though it's not continuous, the variable represents numerical values. One can order the months (1st, 2nd, 3rd...) or quarters (Q1, Q2, Q3, Q4) in a sequence.

In summary, while months and quarters are categories, they have a defined order and can be used in calculations, making them discrete quantitative variables.

Example

The breakdown of the median sale price and median SP/SF by quarter creates discrete quantitative variables. Discrete variables can take on a finite number of values within a specific range. In this case, the number of possible values for the median sale price and median SP/SF is limited by the number of quarterly sales.

Here’s an analysis of the breakdown of the two variables in the table you provided:

    1) Median Sale Price: There is a seasonal pattern to the median sale price, with higher prices in the second and third quarters (Q2 and Q3) and lower prices in the first and fourth quarters (Q1 and Q4). This could be due to several factors, such as buyer behavior or listing availability. For example, more people may be looking to buy a house in the spring and summer months, which could drive prices higher. Additionally, sellers may be more motivated to sell their homes before the end of the year, potentially leading to lower prices in Q4.

   2) Median SP/SF: The median SP/SF also shows a seasonal pattern, with higher prices in Q2 and Q3 and lower prices in Q1 and Q4. This suggests that the seasonal pattern in the median sale price is likely due to changes in the types of properties sold rather than in the county's overall housing prices. For example, a higher proportion of larger homes may be sold in Q2 and Q3, which would drive up the median SP/SF.

Overall, the breakdown of the median sale price and median SP/SF by quarter, which yields a discrete variable, can help explain seasonal trends in the housing market. This information can also help build a more accurate AVM by considering when a property is sold.

In conclusion, understanding the different types of quantitative variables empowers analysts to leverage the data effectively. Combining continuous, ratio, and discrete variables provides a comprehensive view of the housing market, making AVM a valuable tool for property valuation.

Sid's AI-Assisted Bookshelf: Elevate Your Personal and Business Potential


50% Off This Weekend Only – Five Practical Valuation Modeling Books

This weekend only, I’m running a straightforward 50% off campaign on the PDF editions of my five most recent valuation modeling books. The...