0 views

Uploaded by Graciela Marques

Densidade

- ELL701_LinAlg-1
- Assignment Template
- Chapter 3
- Linear Algebra by S. E. Payne
- Solution 1
- myfreelistexperience.pdf
- syllabus
- determinant
- Maths 1 Claire
- Theorems
- A Nonparametric Approach for Validation of Chain Ladder Methods in Claims Reserving
- Simulation With Crystal Ball - Illustration Example
- Quantitative Analysis -Course Outline
- QlikView
- Chapter One of Managerial Economics
- Pro Forma Kursus MTE3105
- Supplement 14
- sol41.pdf
- PPT1
- Questionnaire Design Dss

You are on page 1of 6

August 9, 2018

Type Package

Title Computing Log-Transformed Kernel Density Estimates for Positive

Data

Version 0.3.2

Date 2018-08-09

Author Hien D. Nguyen, Andrew T. Jones, and Geoffrey J. McLachlan

Maintainer Andrew Thomas Jones <andrewthomasjones@gmail.com>

Description Computes log-transformed kernel density estimates for positive data using a vari-

ety of kernels. It follows the methods described in Jones, Nguyen and McLach-

lan (2018) <doi:10.21105/joss.00870>.

License GPL-3

Encoding UTF-8

LazyData true

LinkingTo Rcpp

Imports Rcpp, pracma

SystemRequirements C++11

RoxygenNote 6.0.1

Suggests R.rsp, testthat

VignetteBuilder R.rsp

NeedsCompilation yes

Repository CRAN

Date/Publication 2018-08-09 07:20:04 UTC

R topics documented:

bw.logCV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

bw.logG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

logdensity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

logdensity_fft . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Index 6

1

2 bw.logG

Description

Computes least squares cross-validation (CV) bandwidth (BW) for log domain KDE.

Usage

bw.logCV(x, grid = 21, NB = 512)

Arguments

x numeric vector of the data. Must be strictly positive, will be log transformed

during estimation.

grid number of points used for BW selection CV grid.

NB number of points at which to estimate the KDE at during the CV loop.

Value

bw the optimal least squares CV bandwidth.

References

Silverman, B. W. (1986). Density estimation for statistics and data analysis. Monographs on Statis-

tics and Applied Probability. 26.

Stone, C. J. (1984). An asymptotically optimal window selection rule for kernel density estimates.

The Annals of Statistics, 12(4), 1285-1297.

Examples

bw.logCV(rchisq(100,10), grid=21, NB=512)

Description

Computes bandwidth for log domain KDE using the Silverman rule.

Usage

bw.logG(x)

logdensity 3

Arguments

x numeric vector of the data. Must be strictly positive, will be log transformed

during estimation.

Value

bw the optimal bandwidth.

References

Silverman, B. W. (1986). Density estimation for statistics and data analysis. Monographs on Statis-

tics and Applied Probability. 26.

Wand, M. P., Marron, J. S., & Ruppert, D. (1991). Transformations in density estimation. Journal

of the American Statistical Association, 86(414), 343-353.

Examples

bw.logG(rchisq(100,10))

Description

The function logdensity computes kernel density estimates (KDE) of strictly positive distributions

by performing the KDE in the log domain and then transforming the result back again. The syntax

and function structure is largely borrowed from the function density in package stats.

Usage

logdensity(x, bw = "nrd0", adjust = 1, kernel = "gaussian",

weights = NULL, n = 512, from, to, cut = 3, na.rm = FALSE)

Arguments

x the data from which the estimate is to be computed.

bw the smoothing bandwidth to be used. Can also be can also be a character string

giving a rule to choose the bandwidth. Like density defaults to "nrd0". All

options in help(bw.nrd) are available as well as "bw.logCV" and "bw.logG".

adjust the bandwidth used is actually adjust*bw.

kernel a character string giving the smoothing kernel to be used. Choose from "gaus-

sian", "epanechnikov", "triangular", "uniform", "laplace" and "logistic". Default

value is "gaussian".

weights numeric vector of non-negative observation weights of the same length as x.

4 logdensity_fft

Note that these are equally spaced in the original domain.

from, to the left and right-most points of the grid at which the density is to be estimated;

the defaults are cut * bw outside of range(x).

cut by default, the values of from and to are cut bandwidths beyond the extremes of

the data

na.rm logical; if TRUE, missing values are removed from x. If FALSE any missing

values cause an error.

Value

References

Charpentier, A., & Flachaire, E. (2015). Log-transform kernel density estimation of income distri-

bution. L’Actualite economique, 91(1-2), 141-159.

Wand, M. P., Marron, J. S., & Ruppert, D. (1991). Transformations in density estimation. Journal

of the American Statistical Association, 86(414), 343-353.

See Also

Examples

logdensity(abs(rnorm(100)), from =.1, to=2, kernel='triangular')

Description

The function logdensity_fft computes kernel density estimates (KDE) of strictly positive distri-

butions by performing the KDE via fast fourier transform utilizing the fft function. The syntax

and function structure is largely borrowed from the function density in package stats.

Usage

weights = NULL, n = 512, from, to, cut = log(3), na.rm = FALSE)

logdensity_fft 5

Arguments

x the data from which the estimate is to be computed.

bw the smoothing bandwidth to be used. Can also be can also be a character string

giving a rule to choose the bandwidth. Like density defaults to "nrd0". All

options in help(bw.nrd) are available as well as "bw.logCV" and "bw.logG".

adjust the bandwidth used is actually adjust*bw.

kernel a character string giving the smoothing kernel to be used. Choose from "gaus-

sian", "epanechnikov", "triangular", "uniform", "laplace" and "logistic". Default

value is "gaussian".

weights numeric vector of non-negative observation weights of the same length as x.

n the number of equally spaced points at which the density is to be estimated.

Note that these are equally spaced in the log domain for logdensity_fft, and

thus on a log scale when transformed back to the original domain.

from, to the left and right-most points of the grid at which the density is to be estimated;

the defaults are cut * bw outside of range(x).

cut by default, the values of from and to are cut bandwidths beyond the extremes of

the data

na.rm logical; if TRUE, missing values are removed from x. If FALSE any missing

values cause an error.

Value

An object with class "density". See help(density) for details.

References

Charpentier, A., & Flachaire, E. (2015). Log-transform kernel density estimation of income distri-

bution. L’Actualite economique, 91(1-2), 141-159.

Cooley, J. W., & Tukey, J. W. (1965). An algorithm for the machine calculation of complex Fourier

series. Mathematics of computation, 19(90), 297-301.

Wand, M. P., Marron, J. S., & Ruppert, D. (1991). Transformations in density estimation. Journal

of the American Statistical Association, 86(414), 343-353.

See Also

density, plot.density, logdensity, bw.nrd, bw.logCV, bw.logG.

Examples

logdensity_fft(abs(rnorm(100)), from =0.01, to= 2.5, kernel = 'logistic')

Index

bw.logCV, 2, 4, 5

bw.logG, 2, 4, 5

bw.nrd, 4, 5

density, 4, 5

logdensity, 3, 5

logdensity_fft, 4, 4

plot.density, 4, 5

- ELL701_LinAlg-1Uploaded byHeather Cleveland
- Assignment TemplateUploaded byscorpionthug
- Chapter 3Uploaded bybehnamjp
- Linear Algebra by S. E. PayneUploaded byravikumar20122012
- Solution 1Uploaded byVera Dikaioulia
- myfreelistexperience.pdfUploaded byrprytz
- syllabusUploaded byLee J
- determinantUploaded byHum Nath Baral
- Maths 1 ClaireUploaded byroom8ncs
- TheoremsUploaded bymwalders
- A Nonparametric Approach for Validation of Chain Ladder Methods in Claims ReservingUploaded byIRJET Journal
- Simulation With Crystal Ball - Illustration ExampleUploaded byThanh Ly
- Quantitative Analysis -Course OutlineUploaded byAamir AnwarAli
- QlikViewUploaded byAbhishek
- Chapter One of Managerial EconomicsUploaded byjoonak konwar
- Pro Forma Kursus MTE3105Uploaded bySamuel Noeid
- Supplement 14Uploaded byjeac28
- sol41.pdfUploaded byGautham Shankar
- PPT1Uploaded byAshwin Kumar
- Questionnaire Design DssUploaded byAlbert Awopone
- Network VariablesUploaded byOgunranti Rasaq
- 12 Chi Square and Odds RatiosUploaded byAngela Mitchelle Nyangan
- New Silibus(Sta 131)Uploaded bya
- block planUploaded byapi-253420337
- ch1_1Uploaded byAsim Abdelwahab Abdorabo
- Unit 15Uploaded byDipesh Thakre
- task rubric 1Uploaded byapi-441983720
- CSC423 CSC324 Syllabus Fall2017 (1)Uploaded byjazzbug0318
- 81639Uploaded byJohnSmith
- 1383-2865-1-PBUploaded byMaiman Lato

- pc-go-realidade-etinica-social-histórica.pdfUploaded byLetícia
- CONSTRUCCION_DE_KERNELS_Y_FUNCIONES_DE_DENSIDAD_DE_PROBABILIDAD.pdfUploaded byJoseLuisTangara
- PCN - MatemáticaUploaded byFlávia Basso
- didatica libaneo livro.pdfUploaded byGraciela Marques
- Density EstimationUploaded byGraciela Marques
- APLICAÇÃO DO NUCLEOKernel Smoothing.pdfUploaded byGraciela Marques
- Geometria Analítica - CônicasUploaded byGraciela Marques
- A short course on nonparametric curve estimation R.pdfUploaded byGraciela Marques
- Avaliação e EducaMatemática Paulo Abrantes.pdfUploaded byGraciela Marques
- infopen-dez14Uploaded byMarcos Balan
- IPE 2005Uploaded byJoao Rodrigues
- Libro para aprender RUploaded byluiseduardo44
- Solucionario de Dennis g Zill - Ecuaciones Diferenciales(2)Uploaded bydesigniusk
- GetDistreferencias.pdfUploaded byGraciela Marques
- As Diferentes Tendências Em Educação Matemática e oUploaded byGraciela Marques
- Estatistica Para Economistas Hoff PDFUploaded byGraciela Marques
- Resolucao_do_livro_Probabilidade_Um_Curs.pdfUploaded bylemuel
- Kernel SmoothingUploaded byMP113
- Análise Discriminante Clássica e de Núcleo Avaliações eUploaded byGraciela Marques
- Paul L. Meyer - Probabilidade Aplicações à EstatísticaUploaded byFrederic Menezes
- Chapter 1Uploaded byGraciela Marques
- EDO1.pdfUploaded byGraciela Marques
- Resumo Paulo FreireUploaded byKlaus Avila
- Repensando a DiAUploaded byGraciela Marques
- Análise Discriminante Clássica e de Núcleo Avaliações eUploaded byGraciela Marques
- aula_Sim_VAUploaded byGraciela Marques
- Livro Estatística e ProbabilidadeUploaded byGraciela Marques
- NotasdeTeoriadelaEstimacinUploaded byGraciela Marques
- aula_Sim_VAUploaded byJoe Castro

- An Evidence-Based and Occupational Perspective of Interventions for Persons With Substance-use DisordersUploaded byDiego Almeida
- Chapter 1 - Rich Boy Cries for Momma by Ethan H. MinskerUploaded byEthan Minsker
- Latitude and Longitude.pptUploaded byAnonymous fG9nu5
- Flow RegimeUploaded byMuhammad Tidar Wirayudha
- 2017CHE003 FinalPaper Draft 8 1Uploaded byEvan Dulay
- Presentation Mudharabah and Musyarakah FinalUploaded byIha Choco Tiha
- The Truth about Food Deserts: Refocusing Priorities in Addressing Healthy Food Access in Historically Underserved CommunitiesUploaded byLA Food Policy Council
- Allama Iqbal's ReflectionsUploaded byabhadvocate
- JRC72702_Choice of Material for Hollow Section Structures_2016edUploaded bySasi Kumar
- FGA25N120ANTDUploaded byTran Binh
- Foo - APPC05 - Group Piano TeachingUploaded byClara-Schumann-1985
- Plighted Word Being an Account of the History and Objects of the Untouchability Abolition and Temple Entry BillsUploaded byraattai
- Perkins 1506D Engine ManualUploaded byDave Potter
- 05- PAR_Restaurant_Type of Menu_no Image (1)Uploaded byDestya Putri Amalia
- PulmaoUploaded byMatshilario
- test1Uploaded bydinnerdate
- Hmm Tutorial 1Uploaded byLala Nguyen
- English for Hotel StaffUploaded byelberto2
- b.1.Baxandall, Michael, “Art, Society and the Bouguer Principle”, Representations Nº12, University of CaliforniaUploaded bytinuvielda
- Middle English FeaturesUploaded byKrishna Priya
- pete the cat family literacy night materialsUploaded byapi-251830692
- Hybrid Aco-iwd Optimization Algorithm for Minimizing Weighted Flowtime in Cloud-based Parameter Sweep ExperimentsUploaded byInternational Journal of Research in Engineering and Technology
- Social Entrepreneurship BlueprintUploaded byEmily Sullivan
- Carpal Tunnel Syndrome as an OccupationalUploaded bySinggih Saputra
- s20Uploaded byMahfudz Fauzan
- BioJVA Comparison With MRI and CTUploaded byBioRESEARCH Assoc. Inc
- Last Mid-term Exam '17Uploaded byMax Ahumada
- Zheng v. US Atty General, 11th Cir. (2010)Uploaded byScribd Government Docs
- kkfs science celebration rubricUploaded byapi-237447208
- Learning ExcellenceUploaded byZé Fernando