predict_real(model, df, parameter, replicate = FALSE, beta = NULL, data = NULL, se = TRUE, vcv = FALSE)real) is returned if vcv=FALSE;
otherwise, a list is returned also containing vcv.real: The primary arguments are model which is a fitted mark model object and df which is one of the design dataframes from the design data list (ddl) used to fit the model. The value of df can be a subset of the original design dataframe but do NOT create an arbitrary dataframe for use as df because if you don't get the indices correct or you don't construct the factor variables correctly, it will likely fail or the results could be bogus.
The argument parameter is just the character name for the parameter ("Phi"). It is only used to extract the correct formula from the fitted model.
The argument beta can provide values for the beta coefficients other than the fitted ones but if you do so, don't expect the variances to make sense as the beta.vcv is computed at the fitted values. The default for beta is to use the fitted values so it need not be specified.
The argument data is a dataframe containing values for individual covariates or replacement values for design data covariates. Do not replace values of factor variables which probably would not make sense anyhow. If replicate=FALSE then the number of rows in df must match the number of rows in data and the values in df are replaced (if design covariate) or added if an individual covariate. If replicate=TRUE, then design data (df) is replicated for each row in data and the values in data are computed for each one of the rows in df. Using replicate=TRUE would make sense in a case where the value can differ for the index. For example, if one of the design covariates was temperature then you might want to compute the values at a range of temperatures for a row in the design data representing each age class in the data.
The arguments se and vcv control computation of the std errors and v-c matrix.
inverse.link,deriv_inverse.link
data(dipper)
dp=process.data(dipper)
ddl=make.design.data(dp)
model=mark(dp,ddl,model.parameters=list(Phi=list(formula=~Time)))
predict_real(model,ddl$Phi[1,,drop=FALSE],"Phi",replicate=TRUE,data=data.frame(Time=-12:12))
Run the code above in your browser using DataLab