File: dist-ssd.Rd

package info (click to toggle)
fbasics 4052.98-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,020 kB
  • sloc: ansic: 738; makefile: 14
file content (93 lines) | stat: -rw-r--r-- 1,647 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
\name{ssd}
\alias{ssd}

\alias{dssd}
\alias{pssd}
\alias{qssd}
\alias{rssd}


\concept{Spline Smoothed Distribution}


\title{Spline Smoothed Distribution}

\description{
    
  Density, distribution function, quantile function and random
  generation from smoothing spline estimates.
    
}

\usage{
dssd(x, param, log = FALSE)
pssd(q, param)
qssd(p, param)
rssd(n, param)
}

\arguments{
 
  \item{x, q}{
    a numeric vector of quantiles.
  }
  \item{p}{
    a numeric vector of probabilities.
  }
  \item{n}{
    number of observations.
  } 
  \item{param}{
    an object as returned by the function \code{ssdFit}.
  }
  \item{log}{
    a logical flag by default \code{FALSE}. 
    Should labels and a main title drawn to the plot?
  }
}

\details{
  \code{dssd} gives the density,
  \code{pssd} gives the distribution function,
  \code{qssd} gives the quantile function, and
  \code{rssd} generates random deviates.
}

\value{
  numeric vector
}

\author{
  Diethelm Wuertz, Chong Gu for the underlying \code{gss} package.
}

\references{

Gu, C. (2002), 
    \emph{Smoothing Spline ANOVA Models}, 
    New York Springer--Verlag.

Gu, C. and Wang, J. (2003), 
    \emph{Penalized likelihood density estimation: 
    Direct cross-validation and scalable approximation},
    Statistica Sinica, 13, 811--826. 
    
}

\examples{   
## ssdFit -
   set.seed(1953)
   r = rnorm(500)
   hist(r, breaks = "FD", probability = TRUE,
     col = "steelblue", border = "white")
 
## ssdFit - 
   param = ssdFit(r)
   
## dssd -  
   u = seq(min(r), max(r), len = 301)
   v = dssd(u, param)
   lines(u, v, col = "orange", lwd = 2)
}

\keyword{distribution}