gravatar

amrofi

ADRIANO MARCOS RODRIGUES FIGUEIREDO

Recently Published

Pirâmide etária de MS: Projeções do IBGE 2024
Este é um artigo rápido para criar uma pirâmide etária em valores absolutos, considerando os dados de Homens e Mulheres extraído divulgação das projeções populacionais do IBGE de 22-08-2024
Aplicações com R: preços de carros - tabela FIPE: VW Gol
Using the R package "fipe" to extract car prices.
Séries Temporais: previsão de ações com ETS e suavização exponencial
This is an undergrad student level instruction for class use.
Séries Temporais: previsão de ações com ETS
This is an undergrad student level instruction for class use. ETS forecast for PETR4 and VALE3 stocks
Economia Regional em R: Indicadores de análise de especialização regional - QL, CE, KSI, RDI, DIV, UBIQ
This is an undergrad student level instruction for class use.
Dica de uso da função findInterval()
This is an exercise for class use.
Séries Temporais com R: Análise ARIMA do Consumo do Varejo em MS com X13ARIMA-SEATS
Seasonal adjustment and forecast using the seasonal package and X13-ARIMA-SEATS
Exemplo Séries Temporais: consumo Morettin e Toloi: hierárquico - formato ts
Exercício com dados de Morettin e Toloi para o modelo hierárquico com pacote thief de Hyndman (2016).
Séries Temporais: Estimação da série diária de ação GOOG
This is an undergrad student level instruction for class use. The reader is encouraged to enhance the model changing the train data. We used the GOOG data.
Exemplo Séries Temporais: consumo Morettin e Toloi: exponential smoothing - formatos ts
This is a class example to forecast a time series from Morettin e Toloi (2006) using exponential smoothing methods (SES, Holt and Holt-Winters).
Exemplo Séries Temporais: modeltime - AirPassengers
modeltime examples with the airpassengers dataset
Machine Learning in Python: Building a Classification Model
Vamos aqui reproduzir o código do video de Dataprofessor - Chanin Nantasenamat: https://youtu.be/XmSlFPDjKdc. O código original em linguagem python do Jupyter Lab está em https://github.com/dataprofessor/code/tree/master/python/iris.
Longley data com Python
class exercise.
pyTSA_GDPChina_Decomposition Python
Time series decomposition of GDP China series - Huang e Petukhina 2022 - Applied Time Series Analysis and Forecasting with Python
1 Séries Temporais com Python: criando um documento Quarto
Initial instructions to create a Quarto document to further use in time series with Python.
Séries Temporais: exercício Efeitos da Isenção de Impostos nas Taxas de Fertilidade
We analyse specifications of lagged variables to the Wooldridge's example 10.4. This is an exercise using the dynlm package.
Exemplo Séries Temporais: PIB Brasileiro
In this example, I plot several time series plot using Brazilian GDP data from the Central Bank of Brazil, using several packages: rbcb, lattice, ggplot2, dygraphs.
Séries Temporais com R: Conceitos iniciais
O objetivo deste material é capacitar o estudante a realizar aplicações com séries temporais, previsões futuras e decomposição da sazonalidade, tendência e ciclos em séries econômicas.
Piramide etária de MS em 2021
Este é um artigo rápido para criar uma pirâmide etária em valores absolutos (o leitor pode preferir fazer em porcentagem do total), considerando os dados de Homens e Mulheres extraído da plataforma SIDRA-IBGE, tabela 6706.
Extensões ggplot2: ggiraph e ggradar
We illustrate how you can combine ggplot2 and make htmlwidget combined with ggiraph package. We also illustrate how to use ggradar to make radar plots.
Economia Regional: Índice de concentração normalizado (ICN) em R: with Quarto
The basic idea is to describe the math to obtain some regional economics indexes to compute the Normalized Concentration Index (ICN) by principal components. Say: Location Quotient (LQ); a modified Herfindahl-Hirschman (IHHm); Relative Share (PR).
Quarto inicial
This is an initial post regarding Quarto in RStudio.
Econometria: exemplos 10.5 e 12.3 do Wooldridge (2016, p.390)
This is an undergrad student level exercise for class use. We analyse data on Barium market, from 1978m02 to 1988m12.
Econometria: Exercício soja (apostila) em Python
This is an undergrad student level exercise for class use.
Desigualdade nos EUA, 1910-2010 - Piketty (2013)
Income inequality in the USA, 1910-2010 - Piketty (2013)
Econometria: estatísticas descritivas em R e Python
This is an undergrad student level exercise for class use
Econometria em Python: Tabela 5.6 PNB e demanda de moeda, Gujarati e Porter (2011, p.157)
We analyse different money supply concepts and its relation to the GDP. The example is draw following Gujarati and Porter (2011, p.157) using Python in RStudio.
Peça ajuda para codificar em R
This is an undergrad student level exercise for class use. Ask Help to code in R.
Microdados com R: exemplo da PNADCovid de Assuncao (2021)
This is an undergrad student level instruction for class use.
Microdados com R: exemplo da PNADC com srvyr
This is an undergrad student level instruction for class use.
Microdados com R: Despesa com alimentação conforme a POF 2017/2018
This is an undergrad student level instruction for class use. We use a complex survey dataset from IBGE, with the POF - Consumer Expenditure Survey
Econometria: exercício do pacote systemfit - Sistemas de equações simultâneas
This is an undergrad student level exercise for class use. Kmenta's dataset and code from the systemfit package.
Econometria: exercício crescimento municipal em Mato Grosso entre 2001 e 2010 - seleção de variáveis
This is an undergrad student level exercise for class use. We analyse 139 municipal cross-section data for the Brazilian State of Mato Grosso on a static growth model.
Economia Regional: exemplo de treemap no comércio internacional
This is an undergrad student level instruction for class use.
Exercício rápido de deflação usando o deflateBR
This is an exercise for class use. Deflation of the ICMS of Mato Grosso do Sul using data from IPEADATA and BCB.
Estatística básica: adicionar linha de tendência no ggplot2
This is an exercise for class use.
Econometria com AlgoRitmos
This is a partial version of the econometrics textbook course at the Federal University of Mato Grosso do Sul, Brazil, city of Campo Grande-MS. It's designed for a basic econometrics course, mainly with multiple regression using RStudio and R.
Teste t e F para duas amostras
Two sample comparisons for their mean and variance.
Exemplo 10-7: Tendência Wooldridge (2006, p.331) - investimento imobiliário e preços de imóveis
São dados anuais de investimento imobiliário real per capita (invpc em milhares de USD) e um índice de preços de imóveis (price, 1982=1) dos EUA de 1947 a 1988.
Sazonalidade – exemplo 10-11 Wooldridge (2006, p.337) – efeitos das ações anti-dumping
É uma investigação sobre os efeitos de processos anti-dumping sobre importações americanas de bário da China (ver enunciado em Wooldridge (2006, p.325)). A presença de sazonalidade pode estar desestabilizando as séries e induzindo a regressão espúria devido à não-estacionariedade causada pelas sazonalidades.
Python no RStudio: demanda de frangos
This is an undergrad student level exercise for class use. We analyse different equations for the demand for chickens. The example is draw following Gujarati and Porter (2011, p.235-236), portuguese edition.
Econometria com R e Python: exemplo com Longley Data
Class exercises using Longley data with R and Python, source code from Kuan-Lin Pin (http://web.pdx.edu/~crkl/ceR/)
Séries Temporais: cross-validation com pacote fable
The example is a simplified exercise using cross-validation in time series with the fable package.
Econometria: dica muito útil de visualizar resultados com pacote performance, de Matt Dancho (2021).
The example is a simplified exercise using a linear multiple regression with the package performance.
Econometria: Deflacao e TGC com R-Code
This is an undergraduate exercise to deflate the GDP and compute Geometric Growth Rate.
Séries Temporais com R: Análise do Consumo do Varejo em MS com `fable.prophet`
This is an exercise for class use. We analyse data on Retail consumption, from January/2000 to nowadays.
Econometria básica: Shiny code para regressão múltipla em R
This is an undergrad student level instruction for class use. Shiny app to build a multiple linear regression using your own dataset.
Séries Temporais: Estimação do método theta com série diária de ação LAME4
This is an undergrad student level instruction for class use. The reader is encouraged to enhance the model changing the train sample.
Séries Temporais com R: Análise do Consumo do Varejo em MS com o método `THETA` e `fable` e `feasts`
This is an exercise for class use. We analyse data on Retail consumption, from January/2000 to nowadays.
Séries Temporais: Rotina para GARCH com o pacote garchmodels
This is an undergrad student level instruction for class use. I reproduce Almuiña example in garchmodels packege.
Séries temporais: GARCH exemplo em R
This is an undergrad student level instruction for class use. Based on Perlin (2020), kindle edition.
Séries Temporais: Rotina rápida para lidar com missings no fabletools
This is an undergrad student level instruction for class use. I give two options to fill_gaps in a daily time series in fable environment.
Economia Regional: Rotina rápida para associar datasets em R
This is an undergrad student level instruction for class use. We offer a code to compare two dataframes and return an indicator (dummy 1 if yes and 0 for no) if the two dataframes have the observation.
Economia Regional: Índice de concentração normalizado (ICN) em R
This is an undergrad student level instruction for class use
Séries Temporais com R: exemplo de Bitcoin com Facebook Prophet
This is an undergrad student level instruction for class use.
Séries Temporais com R: Análise do Consumo do Varejo em MS com `fable` e `feasts`
This is an exercise for class use. We analyse data on Retail consumption, from January/2000 to January/2020.
Economia Regional: exemplo de localização Comper
We analyse a simple localization problem. Class exercise.
Decomposição de séries temporais
Exemplos de decomposição de séries temporais com o tsibble framework e cálculo manual do fator sazonal comparado com o obtido pelo stats::decompose.
Exemplo Diferenças em diferenças do Torres-Reyna (2015): R e Python
Neste exemplo, reproduzimos o script de aula do Prof. Torres-Reyna (TORRES-REYNA, 2015). Os dados vem das notas de aula (https://www.princeton.edu/~otorres/DID101R.pdf).
Exemplo Séries Temporais: consumo Morettin e Toloi
Exemplo de Séries Temporais com dados do consumo de Morettin e Toloi.
MRIO_Exemplo de Porsse e Vale 2020
Replication of Porsse and Vale (2020) available at http://www.nedur.ufpr.br/portal/wp-content/uploads/2020/08/09-insumo-produto-modelos-inter-regionais.pdf
Econometria: exercício preço do cobre nos EUA
We analyse a linear multiple regression of copper price in the USA, according to Gujarati and Porter (2011, p.460), portuguese edition.
Econometria: heteroscedasticidade: salários de advogados - Wooldridge(exemplo 7.8)
This is an undergrad student level exercise for class use.
Econometria: exercicio_soja_apostila
This is an undergrad student level exercise for class use. We analyse soy data, 117 observations.
Econometria: especificação: salários de advogados - Wooldridge(exemplo 7.8)
This is an undergrad student level exercise for class use. Wooldridge Source: Collected by Kelly Barnett, an MSU economics student, for use in a term project. The data come from two sources: The Official Guide to U.S. Law Schools, 1986, Law School Admission Services, and The Gourman Report: A Ranking of Graduate and Professional Programs in American and International Universities, 1995, Washington, D.C. Data loads lazily.
Extraindo o código de um post do Rpubs
This is an undergrad student level exercise for class use. We extract a Rpubs code.
Exemplos para dados de trabalho da PNADC obtidos no SIDRA-IBGE
This is an undergrad student level exercise for class use. We extract and plot Brazilian labor data using sidrar package for the 2019m07 to 2020m7.
Econometria: exemplos 10.5 e 10.11 do Wooldridge (2006, p.325 e 337)
This is an undergrad student level exercise for class use. We analyse data on Barium market, from 1978m02 to 1988m12.
Econometria: dummy e tendência: exercício Efeitos da Isenção de Impostos nas Taxas de Fertilidade
We analyse specifications of dummy and trend variables to the Wooldridge's examples 10.4 and 10.8. This is an exercise using a linear multiple regression.
Econometria: exemplo lanchonetes de Hill et al (2008)
This is an undergrad student level exercise for class use. Big Andy’s Hamburger Sales example.
Econometria: regressão por matrizes
This is an undergrad student level exercise for class use. We estimate an equation using matrices.
Econometria: Python no RStudio
This is an undergrad student level instruction for class use. We replicate Python in R chunks and Python in Python chunks in RMarkdown of RStudio.
Econometria: copy and paste do Excel para RStudio
This is an undergrad student level instruction for class use. This work is a small help to load MS Excel data into RStudio using copy (control+C) and paste (control+V).
Economia Regional: Mapas de Coeficiente de Especialização em R
This is an undergrad student level instruction for class use. We make Specialization maps for Mato Grosso do Sul, 2016, using employment data.
Economia Regional: análise de decomposição shift-share em R
This is an undergrad student level instruction for class use. We make a shift-share decomposition analysis and introduce a Arcelus type decomposition.
Econometria: exemplo de dados em painel em R - Torres-Reyna data
This is an undergrad student level instruction for class use. Based on Torres-Reyna (2010)
Economia Regional: reprodução de medidas de LQ conforme Haddad (2018) em R
This is an undergrad student level instruction for class use.
Economia Regional em R: Indicadores de análise - CV, Vw e Theil
This is an undergrad student level instruction for class use.
Séries Temporais com R: Análise Theta para o Consumo do Varejo em MS com pacotes forecast::thetaf e forecTheta
This is an exercise for class use. We analyse data on Retail consumption, from January/2000 to nowadays.
Séries Temporais com R: Análise ARIMA do Consumo do Varejo em MS com X13ARIMA-SEATS
Exercício para a serie de varejo de MS com X13ARIMA-SEATS
Séries Temporais com R: Análise do consumo Morettin com X13ARIMA-SEATS
This is an exercise for class use. We analyse data on Retail consumption.
Mapas em R com `geobr`
Drawing maps of Municipal HDI in the Brazilian State of Mato Grosso do Sul using `ggplot2` and `geobr` packages.
Econometria: Salários de advogados - Wooldridge(exemplo 7.8) adaptado de MOHR (2018)
This is an undergrad student level exercise for class use.
Econometria: exemplo de seleção de modelos, Faraway (2014)
Exercício do cap 10 do livro do Faraway (2014), Linear models with R, 2nd edition, adaptado de http://www.maths.bath.ac.uk/~jjf23/LMR/scripts2/varsel.R .
Econometria: exercício crescimento municipal em Mato Grosso entre 2001 e 2010
This is an undergrad student level exercise for class use. We analyse 139 municipal cross-section data for the Brazilian State of Mato Grosso on a static growth model.
Econometria: exemplo multicolinearidade - horas de trabalho da mulher, Gujarati (2015, p.84-92 english second edition)
We analyse multicollinearity using example from Gujarati's Econometrics by Example, 2nd edition - regression and principal components analysis. Women's work hours - regression and principal componente analysis.
Econometria: exemplo 11.10, heterocedasticidade, Gujarati (2004, p.424 english edition) (p388 Brazilian edition)
We analyse heteroskedasticity using example 11.10 from Gujarati's Basic Econometrics.
Econometria: regressão com dados do Índice de Competitividade Global do WEF e o pacote `data360r`
We analyse a regression model using the WEF Global Competitiveness Index (GCI) dataset and the World Bank's package `data360r`.
Séries Temporais com R: Combinação de forecasts para o Consumo do Varejo em MS com `forecastHybrid`
This is an exercise for class use. We analyse data on Retail consumption, from January/2000 to nowadays and make forecast combination using `forecastHybrid` package.
Séries Temporais com R: Exemplo ARCH com stocks
Este artigo procura ilustrar os procedimentos para trabalhar com ações de uma empresa no âmbito dos métodos de séries temporais, com modelos da família ARCH. É baseado e adaptado a partir do script do Prof. Pedro Costa Ferreira (FGV) disponível em: <https://github.com/pedrocostaferreira/SeriesTemporais/blob/master/Aula8_GARCHmodel_PETR4.R>.
Séries Temporais com R: Modelo híbrido para BVSP Bovespa - B3
This is an undergrad student level instruction for class use. We try to ilustrate time series methods with hybrid models using `forecastHybrid` package.
Séries Temporais com R: Modelo híbrido de Hyndman e Athanasopoulos (2018)
This is an undergrad student level instruction for class use. We try to ilustrate time series methods with hybrid models (forecast combination), following Hyndman e Athanasopoulos (2018)
Econometria com Microdados da PNAD contínua de 2018 com R::PNADcIBGE, de BRAGA (2017)
This is an undergrad student level instruction for class use. We use microdata (complex survey data) from IBGE - Brazil, year 2018, 5th interview, in order to do some calculations using PNADcIBGE package.
Séries Temporais com R: Análise ARIMA do Consumo do Varejo em MS
This is an exercise for class use. We analyse data on Retail consumption, from January/2000 to nowadays.
GVC com R: reprodução do `decompr` de Bastiaan Quast
This is an undergrad student level instruction for class use. The vignette `decompr` is reproduced and adapted.
Econometria: exercício da quantidade produzida de algodão em MS, MT e GO
We analyse different specifications of dummy variables for the states in the explanation of the produced cotton. The example is a simplified exercise using a linear multiple regression.
Séries Temporais com R: Arima simulator
This is an undergrad student level instruction for class use. We simulate different AR, MA and ARIMA processes.
Econometria: regressão linear por matrizes
This is an undergrad student level instruction for class use. We use data from Table 2.4 (Gujarati and Porter, 2011, p.67 - portuguese edition) in order to run a simple linear regression using the `lm()` function and also using matrices.
Séries Temporais: suavização exponencial e acurácia
This is an undergrad student level instruction for class use. I use the retail index of Mato Grosso do Sul in order to estimate Holt-Winters models and evaluate accuracy.
Séries Temporais: decomposição clássica e a abordagem X11
This is an undergrad student level instruction for class use. We use decompositions methods in the retail series of Mato Grosso do Sul, Brazil.
Text Mining e Nuvem de palavras com R: Bíblia, Evangelho segundo Mateus
Neste arquivo utilizo uma nuvem de palavras para ver as palavras mais impactantes do Evangelho segundo Mateus.
Econometria com Panel Data: Exemplo utilizando pder::FinanceGrowth dataset
This is an undergrad student level instruction for class use. Example using pder::FinanceGrowth dataset.
Econometria com Complex Survey: Resolução exercício 7.6 Heeringa et al (2010)
This is an undergrad student level instruction for class use. EXAMPLE 7.6 WITH COMPLEX SAMPLE ADJUSTMENT AND WEIGHTS USING SVYGLM.
Economia Regional: exercícios com R
This is an undergrad student level instruction for class use.
Economia Regional: Mapas de Quociente Locacional em R
This is an undergrad student level instruction for class use, drawing maps of location quotient using the `sf` package.
Aplicações com R: preços de carros - tabela FIPE
We analyse car prices in Brazil using the FIPE's table.
Séries Temporais com R: Modelo híbrido em opera
Este artigo procura ilustrar os procedimentos para trabalhar com métodos de séries temporais para Modelo híbrido em `opera`. Baseado em postagem de Rob J Hyndman (HYNDMAN, 2016).
Economia Regional: análise de insumo-produto de Leontief em R
This is an undergrad student level instruction for class use. We use a small 2x2 input-output Leontief's type matrix to ilustrate the output, employment and income multipliers (type I and II) and linkage effects (backward and forward).
Economia Regional: polos, diversidade e especialização em R
This is an undergrad student level instruction for class use. We compute Location Quotients, diversity and ubiquity indexes, as well as specialization. We use EconGeo R-package and draw a diversity map. We also apply the RGI classification of geographical regions in the State of Mato Grosso do Sul, Brazil.
Economia Regional: Lei de Zipf em R
This is an undergrad student level instruction for class use. We calculate de rank-size rule (Zipf's Law) for Mato Grosso do Sul, 2015.
Painel Espacial com R: reproduzindo Millo e Piras (2012)
Este paper faz a reprodução do script do artigo de Millo and Piras (2012), splm: Spatial Panel Data Models in R. Journal of Statistical Software, 47(1), 1-38. URL: http://www.jstatsoft.org/v47/i01/.
Economia Regional: Mapas em R
This is an undergrad student level instruction for class use. We draw a map for the Brazilian State of Mato Grosso do Sul, define neighborhood matrices (queen, rook and distance) and calculate Moran's I and Anselin's LISA. We also draw LISA significance cluster maps.
Dados do IPEA com R: `ipeadatar`
Este material visa auxiliar na obtenção de séries econômicas do IPEAData diretamente do repositório, fazendo uso do pacote `ipeadatar` de Gomes(2019).
Indicadores econômicos de MS 24 de Abril de 2019
Economic indicators of the Brazilian State of Mato Grosso do Sul until Mar/2019
Tópicos de econometria: ações
This is an undergrad exercise working with stocks and candlesticks plots.
Tópicos em econometria: Tipos de dados
We make a brief description of quantitative dataset types: cross-section, time series; and combination of both (as well as the panel data set)
Econometria: exercício Longley, Forças Armadas, de Greene (2003), Tabela F4_2
This is an undergrad student level exercise for class use. The example is drawn following Greene (2003). The Longley data is in datasets package.
Econometria: exercício Tabela F3.1, investimento de Greene (2012,7ed.,p.28-29 e 1109)
This is an undergrad student level exercise for class use. The example is drawn following Greene (2012,7ed.,p.28-29 e 1109), using multiple regression diagnostics.
Apêndice - instalação do RStudio
Nesta seção faz-se uma breve sugestão de como instalar o R e o RStudio a fim de permitir seu uso nas rotinas rpubs
Apresentação das Séries Temporais com RStudio
The objective of this material is to enable the student to make applications with time series, future forecasts and the decomposition of seasonality, trend and cycles in economic series.
Econometria: exercício 11.15, automóveis, Gujarati e Porter
This is an undergrad student level exercise for class use. We analyse data on 81 cars about MPG (average miles per gallons). The example is draw following Gujarati and Porter (2011, p.408-409), portuguese edition.
Econometria: Efeitos da Isenção de Impostos nas Taxas de Fertilidade update
We analyse specifications of dummy and trend variables to the Wooldridge’s example 10.8. This is an exercise using a linear multiple regression.
Exercício de dummies para os setores censitários de Sinop-MT, Brasil
We analyse soybean production at Sinop-MT with dummies to sepparate census sectors. We have 59 census sectors from the Brazilian Agricultural Census 2006.
Econometria: exercício Efeitos da Isenção de Impostos nas Taxas de Fertilidade
We analyse specifications of dummy and trend variables to the Wooldridge's examples 10.4 and 10.8. This is an exercise using a linear multiple regression.
Econometria: exercício 7.19, demanda por frangos, Gujarati e Porter (2011, p.235-236)
This is an undergrad student level exercise for class use. We analyse different equations for the demand for chickens. The example is draw following Gujarati and Porter (2011, p.235-236), portuguese edition.
Econometria: exercício 5.14, demanda de moeda, Gujarati e Porter (2011, p.157)
We analyse different money supply concepts and its relation to the GDP. The example is draw following Gujarati and Porter (2011, p.157, portuguese edition) using Gujarati and Porter (2009, 5th english edition) datasets. The data may be obtained using the github: <https://github.com/amrofi/Gujarati-and-Porter-dataset>