Optimization and model fitting Flashcards

1
Q

optim(par, fn, method = c(“Nelder-Mead”, “BFGS”, “CG”, “L-BFGS-B”, “SANN”)

A

general-purpose optimization; par is initial values, fn is function to optimize (normally minimize)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

nlm(f,p)

A

minimize function f using a Newton-type algorithm with starting values p

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

lm(formula)

A

it linear models; formula is typically of the form response termA + termB + …; use I(x*y) + I(xˆ2) for terms made of nonlinear components

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

glm(formula,family=)

A

it generalized linear models, specified by giv- ing a symbolic description of the linear predictor and a description of the error distribution; family is a description of the error distribution and link function to be used in the model; see ?family

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

nls(formula)

A

nonlinear least-squares estimates of the nonlinear model parameters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

approx(x,y=)

A

linearly interpolate given data points; x can be an xy plot- ting structure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

spline(x,y=)

A

cubic spline interpolation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

loess(formula)

A

it a polynomial surface using local fitting
Many of the formula-based modeling functions have several common argu- ments: data= the data frame for the formula variables, subset= a subset of variables used in the fit, na.action= action for missing values: “na.fail”, “na.omit”, or a function. The following generics often apply to model fitting functions:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

predict(fit,…)

A

predictions from fit based on input data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

df.residual(fit)

A

returns the number of residual degrees of freedom

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

coef(fit)

A

returns the estimated coefficients (sometimes with their

standard-errors)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

residuals(fit)

A

returns the residuals

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

deviance(fit)

A

returns the deviance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

fitted(fit)

A

returns the fitted values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

logLik(fit)

A

computes the logarithm of the likelihood and the number of

parameters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

AIC(fit)

A

computes the Akaike information criterion or AIC

17
Q
A