Description Usage Arguments Value References See Also Examples

This function calculates the score vector S and the inverse of the Fisher information
matrix for the fixed (beta) and the random effects (u1, u2) in Model 2. This model has two independet sets of random effects.
The first one contains independent random effects u1dk associated to each category and domain. The second set contains random effects
u2dkt associated to each category, domain and time period. Model 2 assumes that the u2dk are independent across time.
`modelfit2`

uses the output of this function to estimate the fixed and random effect by the PQL method.

1 | ```
Fbetaf.it(sigmap, X, Z, phi1, phi2, y, mu, u1, u2)
``` |

`sigmap` |
a list with the model variance-covariance matrices for each domain. |

`X` |
list of matrices with the auxiliary variables obtained from |

`Z` |
design matrix of random effects obtained from |

`phi1` |
vector with the first variance component obtained from |

`phi2` |
vector with the second variance component obtained from |

`y` |
matrix with the response variable, except the reference category obtained from |

`mu` |
matrix with the estimated mean of the response variable obtained from |

`u1` |
matrix with the values of the first random effect obtained from |

`u2` |
matrix with the values of the second random effect obtained from |

A list containing the following components.

`F` |
the inverse of the Fisher information matrix. |

`S` |
(beta, u1, u2) scores |

Lopez-Vizcaino, ME, Lombardia, MJ and Morales, D (2013). Small area estimation of labour force indicator under a multinomial mixed model with correlated time and area effects. Submitted for review.

`data.mme`

, `initial.values`

,
`wmatrix`

, `phi.mult.it`

,
`prmu.time`

, `phi.direct.it`

,
`sPhikf.it`

, `ci`

,
`modelfit2`

, `msef.it`

,
`mseb`

.

1 2 3 4 5 6 7 8 9 10 11 12 | ```
k=3 #number of categories of the response variable
pp=c(1,1) #vector with the number of auxiliary variables in each category
mod=2 #Type of model
data(simdata2) #data
datar=data.mme(simdata2,k,pp,mod)
initial=datar$initial
mean=prmu.time(datar$n,datar$Xk,initial$beta.0,initial$u1.0,initial$u2.0)
sigmap=wmatrix(datar$n,mean$estimated.probabilities)
##The inverse of the Fisher information matrix of the fixed effects
Fisher=Fbetaf.it(sigmap,datar$X,datar$Z,initial$phi1.0,initial$phi2.0,
datar$y[,1:(k-1)],mean$mean,initial$u1.0,initial$u2.0)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.