Description Usage Arguments Value Examples
This function produces EBLUPs and MSE of Multivariate SAE with Difference Benchmarking for non-sampled area
1 2 3 4 5 6 7 8 9 10 |
formula |
List of formula that describe the fitted model |
vardir |
Sampling variances of direct estimations included in data frame as the vector with the name of sampling variances in order : |
cluster |
cluster information |
nonsample |
A column with logical values, |
samevar |
Whether the variances of the data are same or not. Logical input with default |
MAXITER |
Maximum number of iteration in Fisher-scoring algorithm with default |
PRECISION |
Limit of Fisher-scoring convergence tolerance with default |
data |
The data frame |
This function returns a list of the following objects:
MSAE_Eblup_sampled |
A dataframe with the values of the EBLUPs estimators for sampled areas |
MSAE_Eblup_all |
A dataframe with the values of the EBLUPs estimators for all areas |
MSE_Eblup_sampled |
A dataframe with the values of estimated mean square errors of EBLUPs estimators for sampled areas |
MSE_Eblup_all |
A dataframe with the values of estimated mean square errors of EBLUPs estimators for all areas |
randomEffect_sampled |
a dataframe with the values of the random effect estimators for sampled areas |
randomEffect_all |
a dataframe with the values of the random effect estimators for all areas |
Rmatrix_sampled |
a block diagonal matrix composed of sampling errors for sampled areas |
fit |
A list containing the following objects: |
method : The fitting method (this function is using "REML")
convergence : The convergence result of Fisher-scoring algorithm (Logical Value)
iterations : The number of Fisher-Scoring algorithm iterations
estcoef : A dataframe with the estimated model coefficient, standard error,t statistics, p-values of the significance of each coefficient
refvar : A dataframe with estimated random effect variances
informationFisher : A matrix of information fisher from Fisher-scoring algorithm
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ##load dataset
data(datamsaeDBns)
#Note : Make sure yout dataset does not contain NA Values
# you can set 0 in Direct estinations and vardir for non-sampled areas.
#Compute Fitted model for Y1, Y2, and Y3
#Y1 ~ X1 + X2
#Y2 ~ X1 + X2
#Y3 ~ X1 + X2
##Using parameter 'data'
formula = list(f1 = Y1~X1+X2,
f2 = Y2~X1+X2,
f3 = Y3~X1+X2)
vardir = c("v1","v12","v13","v2","v23","v3")
cluster = c("clY1","clY2","clY3")
nonsample = "nonsample"
msaeFHns <- msaefhns(formula,vardir, cluster, nonsample, data=datamsaeDBns)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.