text:
# All Questions

7,794 questions
30 views

### How to the determine the initial conditions of the following coupled non-linear ODEs

I am trying to determine the roots (initial conditions) of $θ'$ and $f''$ in the set of ODEs below so I can solve as an initial value problem using the Runge-Kutta method. I tried using Newton-Raphson ...
35 views

### GPGPU language for AMD?

Nvidia seems to be dominating the HPC / GPGPU computing landscape with CUDA. If I want to write a scientific application using and AMD GPU, what is the preferred language these days? I believe it used ...
15 views

### maximum eigenvalue across subsamples

I have an $N$-dimensional vector of data, say $X_{t}$, with $1 \leq t \leq T$. Of this vector $X_{t}$, I want to consider vectors, say $X_{t}^{b}$, which are $m$-dimensional combinations of elements ...
35 views

### Library for Discontinuous Galerkin method: FEniCS vs deal.ii

I am aware that both FEniCS and deal.ii are capable of solving problems with Discontinuous Galerkin (DG) method. I would like to specifically know if any of these two softwares can cater these ...
6 views

### How to simulate 2D mass diffusion equation in python?

It is similar to the heat transfer of 2D diffusion.
20 views

### Find shift in high resolution noisy signal if only local argmax data are available

Let's say I have a signal which consists several pulses of approximately equal height, and I have to correlate it with the expected positions of the peaks to find the shift of this signal w.r.t. a ...
15 views

### how to estimate the number of people on a street within an hour?

I tried to use opencv to analyze a video filmed on the street. But the problem is the performance is not enough. I think the number of people must follow the poisson distribution. So I want to ...
27 views

### Algebraic multigrid for coupled equations

As far as I understand is algebraic multigrid(AMG) a method that was intentionally developed to solve linear systems where every grid point or node has a single DOF. When AMG should now be used for ...
755 views

### How to address numerical non-associativity for parallel reduction?

A parallel reduction assumes that the corresponding operation is associative. This assumption is violated for addition of floating point numbers. You might ask why I care about this. Well, it makes ...
24 views

70 views

### Creating dense random configuration in for molecular dynamics

I am creating a random configuration of particles for a molecular dynamics simulation, where I would like to guarantee a certain density. The strategy is as follows: choose randomly the positions of ...
49 views

### Using physical parameter as a Gaussian Random Variable in a simple Poisson Problem

I want to vary the input parameter of a physical dynamic mechanics problem, as a Gaussian Random variable and view the resulting Probability Density Function. I used the Finite Element Method to ...
348 views

### Fast algorithm for computing matrix square root using randomized linear algebra?

Is there a fast algorithm for computing the matrix square root of a real symmetric matrix using random matrices or randomized algorithms?
179 views

### Solving a nonlinear equation with random variable

I would like to solve an equation that looks like this UPDATE $E[(R^{1-\gamma})(r_k+\theta-r_z)]=0$ , where $R=\phi r_z+(1-\phi)(r_k+\theta)$ and $\phi\in[0,1]$, $\theta$, is a random variable ...
100 views

### Random access random permutations

I have a large number of parallel processes and a large integer $n$, and want to randomly partition the integers $[0,n)$ among the processes with only $O(1)$ communication. One nice way to do this ...
1k views

### Constructing random divergence-free velocity fields

I am trying to simulate decaying homogeneous isotropic turbulence. As initial condition I want a divergence-free vector-field, i.e, $\mathrm{div} U = 0$. How do I initialize random velocity field in ...
320 views

### How to create a random 3D domain representing a plant's root structure?

I would like to model laminar flow of water from roots to the stem of a plant. At the very end of the roots, the tubes vary from millimeter to centimeter scale in diameter and length. As we get closer ...
2k views

### Simulated Annealing proof of convergence

I implemented downhill simplex simulated annealing algorithm. Algorithm is very hard to tune, w.r.t. parameters including cooling schedule, starting temperature... My first question is about ...
642 views

### What is the most appropriate derivative free optimization algorithm

We can use random optimization/ derivative free/ direct search to find the minimum of some black box function $f$. If I have some 2D black box function, $f(x,y)$ - which I know to be convex - what ...
834 views

### Hashing algorithms/implementations for Monte Carlo simulation

To summarise this question in advance, I'm looking for a good hash function that is suitable for generating pseudo-random numbers in Monte Carlo simulations. This means it should be reasonably fast (...
884 views

### Sampling from posterior predictive distribution

First post. I'm working on this problem using Bayesian methods. In desperation I'm considering using p-values (shock horror), specifically posterior predictive p-values. So I need to simulate from the ...
292 views

### Random placement of euclidean points with constrained inter-point distances in a fixed area

I'd like to place as many random points as possible in a 2D square $S=[0,1]x[0,1]$ such that the euclidean distance $d$ between any two points $d$ is greater than a given value $b$ (b is small). I'm ...
149 views

### solving for unknown inside an expectation

I need to find roots for the following function: $$f(\theta) \equiv E[R(\theta;\eta)]=0$$ for some unknown $\theta$ which is deterministic, while the expectation is taken over a normally ...
127 views

### What is the name of the optimization algorithm that uses random sampling?

I am generating random weight as per e.g. below. The I generate a set of 3 values say 100, 250, 300 and I multiple them with the weights below Initial population. ...
30 views

### Randomized Submatrix of a Sparse Matrix

I have a sparse square matrix $A$ with size $n \times n$ and number of nonzero entries $nnz$. The goal is making a sub-matrix $B$ with $s$ nonzeros which are randomly chosen from $A$. Duplicates are ...
289 views

### Uniform dots distribution in a sphere

I'm trying to implement Barnes-Hut algorithm, with a binary tree. My initial conditions are a uniform mass distribution in a sphere with radius $R$. How can I create uniform dots distribution in a ...
34 views

### Is this a form of stochastic gradient descent?

I want to minimize the following with respect to parameters $B$. $$\sum_{k = 1}^{K} f(A_{k}, B)$$ where $A_k$ are $K$ different data-sets and $B$ is a matrix of parameters. Can I do this by a ...
124 views

### Monte Carlo simulation [on hold]

I am wondering if I am thinking correctly about the following problem : Define the box of the dimensions $(a,a,H)$ in the $X$,$Y$, and $Z$ directions, respectively. Insert $n$ particles into the box ...
75 views

### Pseudo random numbers

I am learning how to use pseudo random number generators but the instructor just told us how they work without explaining why they work. For example, can one prove that the numbers generated by LCG ...
388 views

### Drunken Man in Matlab

I wrote a script that plots the results of the "drunken lamppost" problem in MATLAB. Now I need to create a road-width from -3 to +3, length from 0 to infinity but the drunk can walk just ahead. It ...
39 views

### Monte-Carlo method for action (Solved) [closed]

What I want to do is during Monte Carlo iteration, minimize the action ( or cost function ) which is defined as the sum of 'sum' and print the corresponding zeta and theta array elements which shows ...
3k views

### Is Fortuna or Mersenne Twister preferable as an algorithmic RNG?

A recent answer mentioned the use of Fortuna or Mersenne Twister Random Number Generators (RNGs) to seed a Monte Carlo simulation. I hadn't heard of Fortuna before so I looked it up - looks like it is ...


text:
## 10.5 Top-down approaches

Top-down approaches involve first generating forecasts for the “Total” series $$y_t$$ on the top of the aggregation structure and then disaggregating these downwards. We let $$p_1,\dots,p_{m}$$ be a set of proportions which dictate how the base forecasts of the “Total” series are to be distributed to revised forecasts for each series at the bottom-level of the structure. For example for the hierarchy of Figure 10.1 using proportions $$p_1,\dots,p_{5}$$ we get, $\ytilde{AA}{t}=p_1\hat{y}_t,~~~\ytilde{AB}{t}=p_2\hat{y}_t,~~~\ytilde{AC}{t}=p_3\hat{y}_t,~~~\ytilde{BA}{t}=p_4\hat{y}_t~~~\text{and}~~~~~~\ytilde{BB}{t}=p_5\hat{y}_t.$ Using matrix notation we can stack the set of proportions in a $$m$$-dimensional column vector $$\bm{p}=(p_1,\ldots,p_{m})'$$20 and write $\tilde{\bm{y}}_{K,t}=\bm{p}\hat{y}_t$ Once the bottom-level $$h$$-step-ahead forecasts have been generated these can be aggregated to generate coherent forecasts for the rest of the series. In general using the summing matrix and for a specified set of proportions, top-down approaches can be represented as, $\tilde{\bm{y}}_h=\bm{S}\bm{p}\hat{y}_t.$ Note that for all top-down approaches the top-level coherent forecasts are equal to the top-level base forecasts, i.e., $$\tilde{y}_{h}=\hat{y}_{h}$$.

The most common top-down approaches specify proportions based on the historical proportions of the data. The two most common versions follow. These performed well in the study of Gross and Sohl (1990) hence the acronyms in the forecast package.

### Average historical proportions

$p_j=\frac{1}{T}\sum_{t=1}^{T}\frac{y_{j,t}}{{y_t}}$ for $$j=1,\dots,m$$. Each proportion $$p_j$$ reflects the average of the historical proportions of the bottom-level series $$y_{j,t}$$ over the period $$t=1,\dots,T$$ relative to the total aggregate $$y_t$$.

This approach is implemented in the forecast package by setting

forecast(...,method = "tdgsa",...).

### Proportions of the historical averages

$p_j={\sum_{t=1}^{T}\frac{y_{j,t}}{T}}\Big/{\sum_{t=1}^{T}\frac{y_t}{T}}$ for $$j=1,\dots,m$$. Each proportion $$p_j$$ captures the average historical value of the bottom-level series $$y_{j,t}$$ relative to the average value of the total aggregate $$y_t$$.

This approach is implemented in the forecast package by setting

forecast(..., method = "tdgsf", ...).

The greatest attribute of such top-down approaches is their simplicity to apply. One only needs to model and generate forecasts for the most aggregated top-level series. In general these approaches seem to produce quite reliable forecasts for the aggregate levels and they are very useful with low count data. On the other hand, their greatest disadvantage is the loss of information due to aggregation. Using such top-down approaches, we are unable to capture and take advantage of individual series characteristics such as time dynamics, special events, etc.

### Forecast proportions

An alternative approach that improves on the historical and static nature of the proportions specified above is to use forecast proportions introduced in Athanasopoulos, Ahmed, and Hyndman (2009).

To demonstrate the intuition of this method, consider a one level hierarchy. We first generate $$h$$-step-ahead base forecasts for all the series. At level 1 we calculate the proportion of each $$h$$-step-ahead base forecast to the aggregate of all the $$h$$-step-ahead base forecasts at this level. We refer to these as the forecast proportions and we use these to disaggregate the top-level $$h$$-step-ahead forecast and generate coherent forecasts for the whole of the hierarchy.

For a $$K$$-level hierarchy this process is repeated for each node going from the top to the very bottom-level. Applying this process leads to the following general rule for obtaining the forecast proportions $p_j=\prod^{K-1}_{\ell=0}\frac{\hat{y}_{j,h}^{(\ell)}}{\hat{S}_{j,h}^{(\ell+1)}}$ for $$j=1,2,\dots,m$$. These forecast proportions disaggregate the $$h$$-step-ahead base forecast of the “Total” series to $$h$$-step-ahead coherent forecasts of the bottom-level series. $$\hat{y}_{j,h}^{(\ell)}$$ is the $$h$$-step-ahead base forecast of the series that corresponds to the node which is $$\ell$$ levels above $$j$$. $$\hat{S}_{j,h}^{(\ell)}$$ is the sum of the $$h$$-step-ahead base forecasts below the node that is $$\ell$$ levels above node $$j$$ and are directly connected to that node.

We will use the hierarchy of Figure 10.1 to explain this notation and to demonstrate how this general rule is reached. Assume we have generated base forecasts for each series in the hierarchy. Recall that for the top-level “Total” series, $$\tilde{y}_{h}=\hat{y}_{h}$$, for any top-down approach. Here are some examples using the above notation:

• $$\hat{y}_{\text{A},h}^{(1)}=\hat{y}_{\text{B},h}^{(1)}=\hat{y}_{h}= \tilde{y}_{h}$$
• $$\hat{y}_{\text{AA},h}^{(1)}=\hat{y}_{\text{AB},h}^{(1)}=\hat{y}_{\text{AC},h}^{(1)}= \hat{y}_{\text{A},h}$$
• $$\hat{y}_{\text{AA},h}^{(2)}=\hat{y}_{\text{AB},h}^{(2)}= \hat{y}_{\text{AC},h}^{(2)}=\hat{y}_{\text{BA},h}^{(2)}= \hat{y}_{\text{BB},h}^{(2)}=\hat{y}_{h}= \tilde{y}_{h}$$
• $$\Shat{AA}{h}{1} = \Shat{AB}{h}{1}= \Shat{AC}{h}{1}= \yhat{AA}{h}+\yhat{AB}{h}+\yhat{AC}{h}$$
• $$\Shat{AA}{h}{2} = \Shat{AB}{h}{2}= \Shat{AC}{h}{2}= \Shat{A}{h}{1} = \Shat{B}{h}{1}= \hat{S}_{h}= \yhat{A}{h}+\yhat{B}{h}$$

Moving down the farthest left branch of the hierarchy coherent forecasts are given by $\ytilde{A}{h} = \Bigg(\frac{\yhat{A}{h}}{\Shat{A}{h}{1}}\Bigg) \tilde{y}_{h} = \Bigg(\frac{\yhat{AA}{h}^{(1)}}{\Shat{AA}{h}{2}}\Bigg) \tilde{y}_{h}$ and $\ytilde{AA}{h} = \Bigg(\frac{\yhat{AA}{h}}{\Shat{AA}{h}{1}}\Bigg) \ytilde{A}{h} =\Bigg(\frac{\yhat{AA}{h}}{\Shat{AA}{h}{1}}\Bigg) \Bigg(\frac{\yhat{AA}{h}^{(1)}}{\Shat{AA}{h}{2}}\Bigg)\tilde{y}_{h}.$ Consequently, $p_1=\Bigg(\frac{\yhat{AA}{h}}{\Shat{AA}{h}{1}}\Bigg) \Bigg(\frac{\yhat{AA}{h}^{(1)}}{\Shat{AA}{h}{2}}\Bigg)$ The other proportions can be similarly obtained. The greatest disadvantage of the top-down forecast proportions approach, which is a disadvantage of any top-down approach, is that they do not produce unbiased revised forecasts even if the base forecasts are unbiased as shown by Hyndman et al. (2011)

This approach is implemented in the forecast package by setting

forecast(..., method = "tdfp", ...).

### References

Gross, C W, and J E Sohl. 1990. “Disaggregation methods to expedite product line forecasting.” Journal of Forecasting 9: 233–54.

Athanasopoulos, George, Roman A Ahmed, and Rob J Hyndman. 2009. “Hierarchical Forecasts for Australian Domestic Tourism.” International Journal of Forecasting 25 (January): 146–66. doi:10.1016/j.ijforecast.2008.07.004.

Hyndman, Rob J, Roman A Ahmed, George Athanasopoulos, and Han Lin Shang. 2011. “Optimal Combination Forecasts for Hierarchical Time Series.” Computational Statistics and Data Analysis 55 (September). Citeseer: 2579–89. doi:10.1016/j.csda.2011.03.006.

1. $$A'$$ denotes the transpose of $$A$$.

format: plain


text:
What is the difference between a 1st and 2nd Order Digital Filter

I was just curious as to the differences between the two order filters?

How I created these discrete filters for references

• Designed in Continuous first then converted into Discrete

• Using Tustin's method as I just want to convert the plant from continuous to discrete

• Fc = 20kHZ

• Used Prep warping nyquist frequency = 20kHZ (Sampling at Ts = 0.000025/40kHz)

Filter 1: 2nd Order Butterworth filter Analog

Filter 1A: 2nd Order Butterworth Filter Discrete

Filter 2: 1st Order RC Filter Discrete

As you can see in Filter 1A I was shocked to see that "Brick-wall" response and was curious to see what if I used a lower order filter.

In Filter 2 you can see a similar result. The only difference I can tell is that magnitude (dB). The 1st Order filter has a flatter pass band then the 2nd Order Butterworth Filter.

Is there any advantage in using a higher order filter when it comes to discrete? Why in discrete the "Brick-Wall" response is much more apparent now when its only a 2nd Order.

Let me know if I even approached this correctly has I haven't dont discrete in a long time, so I wouldn't be surprise if something went wrong.

Bonus question, why when I try to do a step response for both filters I get this:

Another question that came to mind: Could we use the Sampling time to essentially change the Cut off frequency then?

EDIT: Looks like my Sampling times are wrong no idea what I am doing anymore. How do you know which Sampling Time is suitable for you? Or is that the trade off sacrifice how close it looks to the continuous for sampling times

Code:

%% -- Low Pass Filter (LPF) -- %%
R1 = 15000;
R2 = 9100;
C1 = 0.001*10^-6;
C2 = 470*10^-12;

LPF_A = ((1)/(C2*R1*s + C2*R2*s + C1*C2*R1*R2*s^2 + 1));
opt = c2dOptions('Method','tustin','PrewarpFrequency',125663.706);
LPF_D = c2d(LPF_A,0.000025,opt);

• Since your transfer function doesn't look like a low pass filter and your step response is an increasing oscillating function, it seems that something went wrong in how you designed the filter. Mar 24, 2020 at 2:50
• Hi! Thank you for replying. I can confirm its the right transfer function. More importantly if I increase the Sampling rate it now shows a proper step response.
– Leoc
Mar 24, 2020 at 2:58
• Can you post the actual code? I can't make out the sampling frequency, is it 40kHz? Nyquist should be strictly greater than fc, not greater than or equal. Then Ts is 25us/40kHz=62.5ns? It's confusing. Mar 24, 2020 at 14:27
• Yeah of course. Ill put in the main post. @aconcernedcitizen The code is there now
– Leoc
Mar 24, 2020 at 15:26
• @user1850479 The analog filter clearly has a 2nd order magnitude/phase response, and a 2nd order polynomial at the denominator which, when calculated gives a perfectly good Laplace transfer function. The problem could not have been in the design, but in the transformation. Mar 24, 2020 at 16:50

I don't have Matlab, but looking at their online help for c2d and c2dOptions:

'FractDelayApproxOrder'

Maximum order of the Thiran filter used to approximate fractional delays in the 'tustin' and 'matched' methods. Takes integer values. A value of 0 means that c2d rounds fractional delays to the nearest integer multiple of the sample time.

So, unless you have a need for a delay, you should set that to zero. The code should look like this:

opt = c2dOptions('Method', 'tustin', 'PrewarpFrequency', 0);
f0 = 80000;
opt = c2dOptions('Method', 'tustin', 'PrewarpFrequency', f0);
LPF_D = c2d(LPF_A, 1/f0, opt);

Let me know if this does it for you (I really don't have Matlab).

Re-read the online description, it looks like 'tustin' allows the 'PrewarpFrequency', so then you should match that with the c2d(), see updated code.

• Well, in C2D options it does set FractDelayApproxOrder to 0
– Leoc
Mar 24, 2020 at 16:25
• @Pllsz See the updated answer. Mar 24, 2020 at 16:26
• Just checked it. The Fc (Cut off Freq) is no where near the 20kHZ mark. Compare to the original code
– Leoc
Mar 24, 2020 at 16:27
• The Nyquist frequency, f0/2, needs to be greater than fc, so 40kHz is way too low. Try 80kHz. Just realized I copy-pasted your values, without changing f0, as mentioned in the comments above. But if you really aim for a fairly good match in magnitude, f0 should be ~10 times more, if you can afford it. Mar 24, 2020 at 16:34
• I don't know how to put this delicately, but it really looks like you lack some basic notions, so maybe it would be better to first read about signals and systems first, before digging into filter design teritory? This is a free online book. Otherwise this discussion will stretch at every step of an explanation with "but what is that?". Mar 24, 2020 at 18:14


text:
• Definition for "percentage rate"
• A coefficient that is a quotient of two…
• Cross Reference for "percentage rate"
• APR

percentage rate definition

• noun:
• A coefficient that is a quotient of two numbers, in which the denominator has the exact same units as that of the numerator multiplied by a unit of the time and that is expressed in portion things.


text:
# Open Extension Topology is T4

## Theorem

Let $T = \struct {S, \tau}$ be a topological space.

Let $T^*_{\bar p} = \struct {S^*_p, \tau^*_{\bar p} }$ be the open extension space of $T$.

Then $T^*_{\bar p}$ is a $T_4$ space.

## Proof

We have that an Open Extension Space is Ultraconnected.

That means none of its closed sets are disjoint.

Hence, vacuously, any two of its disjoint closed subsets are separated by neighborhoods.

The result follows by definition of $T_4$ space.

$\blacksquare$


text:
# Theodolites, Compass and Traverse Surveying

 Question 1
If the magnetic bearing of the Sun at a place at noon is $S2^{\circ}E$, the magnetic declination (in degrees) at that place is
 A $2^{\circ}E$ B $2^{\circ}W$ C $4^{\circ}E$ D $4^{\circ}W$
GATE CE 2022 SET-2   Geometics Engineering
Question 1 Explanation:
$MB=S2^{\circ}E=180^{\circ}-2^{\circ}=178^{\circ}$
$TB= 180^{\circ}$
Declination, $\delta =TB-MB=180-178=2^{\circ} \; or \; 2^{\circ}E$
 Question 2
The bearing of a survey line is $N31^{\circ}17'W$. Its azimuth observed from north is ______ deg. (round off to two decimal places)
 A 328.71 B 458.25 C 124.65 D 625.25
GATE CE 2022 SET-1   Geometics Engineering
Question 2 Explanation:

$WCB=360-\left ( 31+\frac{17}{60} \right )^{\circ}=329.716^{\circ}$
 Question 3
For a given traverse, latitudes and departures are calculated and it is found that sum of latitudes is equal to +2.1 m and the sum of departures is equal to -2.8 m. The length and bearing of the closing error, respectively, are
 A $3.50 \mathrm{~m} \text { and } 53^{\circ} 7^{\prime} 48^{\prime \prime} \mathrm{NW}$ B $2.45 \mathrm{~m} \text { and } 53^{\circ} 7^{\prime} 48^{\prime \prime} \text { NW }$ C $0.35 \mathrm{~m} \text { and } 53.13^{\circ} \mathrm{SE}$ D $3.50 \mathrm{~m} \text { and } 53.13^{\circ} \mathrm{SE}$
GATE CE 2021 SET-2   Geometics Engineering
Question 3 Explanation:
\begin{aligned} e_{L} &=+2.1 \mathrm{~m} \\ e_{D} &=-2.8 \mathrm{~m} \\ e &=\sqrt{e_{L}^{2}+e_{D}^{2}} \\ &=\sqrt{(2.1)^{2}+(2.8)^{2}}=3.5 \mathrm{~m} \\ \text { Bearing of closing error } &=\tan ^{-1}\left(\frac{e_{D}}{e_{L}}\right) \\ &=\tan ^{-1}\left(\frac{-2.8}{2.1}\right)=-53.13^{\circ} \\ &=53^{\circ} 7^{\prime} 48^{\prime \prime} \mathrm{NW} \end{aligned}
 Question 4
A horizontal angle $\theta$ is measured by four different surveyors multiple times and the values reported are given below.
$\begin{array}{|c|c|c|} \hline \text { Surveyor } & \text { Angle } \theta & \text { Number of observations } \\ \hline 1 & 36^{\circ} 30^{\prime} & 4 \\ \hline 2 & 36^{\circ} 00^{\prime} & 3 \\ \hline 3 & 35^{\circ} 30^{\prime} & 8 \\ \hline 4 & 36^{\circ} 30^{\prime} & 4 \\ \hline \end{array}$
he most probable value of the angle $\theta$ ( in degree, round off to two decimal placesis ________
 A 12 B 28 C 36 D 44
GATE CE 2021 SET-2   Geometics Engineering
Question 4 Explanation:
\begin{aligned} \mathrm{MPV} &=\frac{\left(36^{\circ} 30^{\prime} \times 4\right)+\left(36^{\circ} \times 3\right)+\left(35^{\circ} 30^{\prime} \times 8\right)+\left(36^{\circ} 30^{\prime} \times 4\right)}{4+3+8+4} \\ &=36^{\circ} \end{aligned}
 Question 5
Traversing is carried out for a closed traverse PQRS. The internal angles at vertices P, Q, R and S are measured as $92^{\circ}$,$62^{\circ}$,$123^{\circ}$ and $77^{\circ}$, respectively. If fore bearing of line PQ is $27^{\circ}$, fore bearing of line RS (in degrees, in integer) is _________
 A 258 B 753 C 159 D 218
GATE CE 2021 SET-1   Geometics Engineering
Question 5 Explanation:

$\begin{array}{l} Q=\left[\begin{array}{l} B B \text { of } P Q=27^{\circ}+180^{\circ}=207^{\circ} \\ F B \text { of } Q R=207^{\circ}-68^{\circ}=139^{\circ} \end{array}\right. \\ R=\left[\begin{array}{l} B B \text { of } Q R=139^{\circ}+180^{\circ}=319^{\circ} \\ F B \text { of } R S=319^{\circ}-123^{\circ}=196^{\circ} \end{array}\right. \end{array}$

$\begin{array}{l} Q=\left[\begin{array}{l} B B \text { of } P Q=27^{\circ}+180^{\circ}=207^{\circ} \\ F B \text { of } Q R=207^{\circ}+68^{\circ}=275^{\circ} \end{array}\right. \\ R=\left[\begin{array}{l} B B \text { of } Q R=275^{\circ}-180^{\circ}=95^{\circ} \\ F B \text { of } R S=95^{\circ}+123^{\circ}=218^{\circ} \end{array}\right. \end{array}$
 Question 6
A theodolite is set up at station A. The RL of instrument axis is 212.250 m. The angle of elevation to the top of a 4 m long staff, held vertical at station B, is $7^{\circ}$. The horizontal distance between station A and B is 400 m. Neglecting the errors due to curvature of earth and refraction, the RL (in m, round off to three decimal places) of station B is __________
 A 257.363 B 145.126 C 472.156 D 324.422
GATE CE 2020 SET-2   Geomatics Engineering
Question 6 Explanation:

\begin{aligned} V&=400 \tan 7^{\circ}\\ &=49.113\\ x&=(49.113-4)=45.113\\ RL_B&=212.25+45.113\\ &=257.363m \end{aligned}
 Question 7
A theodolite was set up at a station P. The angle of depression to a vane 2 m above the foot of a staff held at another station Q was $45^{\circ}$. The horizontal distance between stations P and Q is 20 m. The staff reading at a benchmark S of RL 433.050 m is 2.905 m. Neglecting the errors due to curvature and refraction, the RL of the station Q (in m), is
 A 413.05 B 413.955 C 431.05 D 435.955
GATE CE 2020 SET-2   Geomatics Engineering
Question 7 Explanation:

\begin{aligned} \frac{x}{20}&=\tan 45^{\circ}\\ x&=20m\\ RL \; of \; Q&=433.05+2.905-x-2\\ &=433.05+2.905-20-2\\ &=413.955m \end{aligned}
 Question 8
The length and bearings of a traverse PQRS are:

The length of line segment SP (in m, round off to two decimal places), is ________.
 A 33.07 B 25.36 C 47.78 D 44.79
GATE CE 2020 SET-1   Geomatics Engineering
Question 8 Explanation:
\begin{aligned} \Delta L&= 40 \cos 80^{\circ}+50 \cos 10^{\circ}+30 \cos 210^{\circ}\\ &=30.20 \\ \Delta D&=40 \sin 80^{\circ}+50 \sin 10^{\circ}+30 \sin 210^{\circ} \\ &=33.07 \\ \text{Length, \; SP}&=\sqrt{\Delta L^2+\Delta D^2}\\ &=44.79m \end{aligned}
 Question 9
An open traverse PQRST is surveyed using theodolite and the consecutive coordinates obtained are given in the table

If the independent coordinates (Northing, Easting) of station P are (400 m, 200 m) the independent coordinates (in m) of station T, are
 A 194.7, 370.1 B 205.3, 429.9 C 394.7, 170.1 D 405.3, 229.9
GATE CE 2020 SET-1   Geomatics Engineering
Question 9 Explanation:

\begin{aligned} \Delta L &=-5.3 \\ \Delta D&=-29.9 \\ T, \; \text{Northing}&\{400+(-5.3)\}=394.7 \\ T, \; \text{Easting}&\{200+(-29.9)\}=170.1\\ &T[394.7m, 170.1m] \end{aligned}
 Question 10
The data from a closed traverse survey PQRS (run in the clockwise direction) are given in the table

The closing error for the traverse PQRS (in degrees) is ___
 A 2 B 3 C 4 D 5
GATE CE 2019 SET-2   Geomatics Engineering
Question 10 Explanation:
Assuming it as anticlockwise traverse.
Mathematically sum of interior angle for a closed traverse $=(2n-4)\times 90 = (2 \times 4 -4) \times 90 = 360^{\circ}$
Given sum of interior angles, $= 88 + 92 + 94 + 89 = 363^{\circ}$
Then error in interior angle $= 363 - 360 = 3^{\circ}$
Note: In this question as per clockwise traverse included angle should be taken as exterior angle. But if we take exterior angle then we get all interior angles more than $180^{\circ}$.
There are 10 questions to complete.

### 1 thought on “Theodolites, Compass and Traverse Surveying”

1. Qno. 10 diagramn is wrong
Thanks for ur effort


text:
# at the mountains of madness

(. Enigma) 1983 . ; ; . ? . . 12 2015 .

- , . . . , , , . , , - . 2 (, , , ). Enigma is a 1982 Anglo-American drama film directed by Jeannot Szwarc and starring Martin Sheen, Sam Neill, Brigitte Fossey, and Kevin McNally. Based. We would like to show you a description here but the site wont allow. 3 9 ʻ . . - .

Posthumous memories of the greatest pianist of all time. At the end of his life he died on August 1st, 1997, the great Russian pianist agreed. (, 1998). : . PosterClub - .


text:
# How do you factor 5x^2+27x+36?

Aug 14, 2016

$\left(5 x + 12\right) \left(x + 3\right)$

#### Explanation:

Read all the clues and information from the signs and numbers.

$\textcolor{g r e e n}{5} {x}^{2} \textcolor{b l u e}{+} \textcolor{m a \ge n t a}{27} x \textcolor{red}{+} \textcolor{g r e e n}{36}$

Find factors of $\textcolor{g r e e n}{5 \mathmr{and} 36}$ which $\textcolor{red}{A D D}$ to give $\textcolor{m a \ge n t a}{27} .$

The signs are $\textcolor{red}{\text{the SAME}}$ , they are $\textcolor{b l u e}{\text{both positive}}$

Choose factors and find the cross-products.
A bit of trial and error will result in the following.

$\textcolor{w h i t e}{\ldots \ldots .} 5 \text{ } 12 \Rightarrow 1 \times 12 = 12$
$\textcolor{w h i t e}{\ldots \ldots .} 1 \text{ "3 rArr 5 xx3 + 15" } 12 + 15 = 27$

The top row is the first bracket, the second row is the second row.

$\left(5 x + 12\right) \left(x + 3\right)$


text:
## Monday, June 3, 2013

### How One Student Stopped Me From Dropping the Ball

Every year, June review time is when I drop the ball. I usually give out all kinds of review packages and old exams, together with answer keys, and say to my students "Here you go, my part's done, now it's up to you - good luck!" I also drone on and on during the last few classes about all the bazillions of things we did all year, during which time I literally put myself to sleep. I do this because my brain swirls with these kinds of thoughts: "Well I can't possibly go over everything anyway...If they don't know it now they never will....They need to do the work now not me....and anyway this is SO BORING!"  Basically, I drop the ball on the field and say, here it is, if you want it, come get it.

But that's not the same thing as passing the ball, so that someone else benefits from your momentum. This year, I tried to pass the ball. What made that happen? One student's words.

A couple of weeks ago, I asked my students for some input on how they wanted to review for their June exams. They gave me their ideas via a google form. Here are a few:
The best way for me to review is to gather all my notes and start rewriting down the rules to remember them but mostly...practice , practice , practice!
Review packages, those are the best thing for me to review a whole year's worth of stuff.
My ideal review would be to actually review everything we did since the beginning of the year and not only do practice..... I think we would just need to refresh everything in our minds.
do some problems from every chapter but i know you know how to do the best review ever :)
That last one is the one that did it. "I know you know how to do the best review ever." That came from a student who has put in an effort of 200% all year, and more importantly, has always taken the time to tell me how much he appreciates my efforts, so he had my ear. When I read that, all those swirling, bored, tired, I'm-now-dropping-the-ball thoughts thudded to the floor. I did NOT want to let this student, or any of my students, down.

So I put together some overviews that actually did make it interesting, at least for me, who has seen it all before a zillion times. Based on their reactions, it didn't work perfectly, and I already see lots of places to improve. But I feel better about this than anything I've ever done at this time of year in my entire career.

First, I must mention, that all year we've used a graphic organizer for each of the functions we've studied. I call it the Wheel of Function (get it? Wheel of Fortune?....sigh....). Every time we finish a new function, we go around the wheel of function and summarize it using these headings, so this is not the first time I've tried to give them a Big Picture of some sort:

But this time, it became the Wheel of FunctionS:

I used the wheel to make activities that would:
• cover a heck of a lot of material in a very short time
• meet them halfway in terms of content - start with activities at the lower end of Bloom, then work our way up
• get them up to speed so they can do the practice they need/want
• deepen understanding for some
• cause understanding for others
• at the very least make them do some review during class if nowhere else
Here are some that we did, and some that I came up with afterwards, with the instructions I gave as captions. By the way, these were all given to them in powerpoint format, so that they could move the tiles around:

 Match the groups of graphs to the function rule Then get into more detail:
 Move each tile into the appropriate column

Properties:
After more matching, look at the properties from a comparative point of view, leading to some Higher-Order-Thinking: There are similarities between log and square root function domains, so why is the only difference the inclusive/exclusive brackets? Or - The exponential and log graphs look very similar - how can you tell the difference between them?

Definitions of basic functions:

For this one I had them all writing on the board, just for variety. It was interesting to see how little everyone remembered. And frightening. It was a great opportunity to go over the algebra behind how we simplified them, and there was an aha moment for at least one student who said she hadn't noticed that we never did simplify the trig functions. Next year, maybe we will by using identities (AT LAST SOMETHING USEFUL HAS COME FROM IDENTITIES!!!)

 Fill in the simplified form for each function
Solving equations and finding intercepts:

Before getting into the nitty-gritty algebra, an overview of What to Expect When You're Solving an Equation. (I think next time, I'll have them fill in the orange part first.) The idea behind the purple part was that for some equations, it's obvious when there's no solution - for example, if a quadratic equation has no solution, some kids find out only when they try to take the square root of a negative number, and their calculator lets them know. But for some equations, it's easy to miss when there is no solution, because the algebra doesn't always alert you, for example, in this equation,     $\sqrt{x + 3} = -1$   it's very tempting to square both sides, but the fact is that there is no solution to it. I wanted them to be on the alert for those situations, as well as to realize, perhaps for the first time in their math lives, that linear equations ALWAYS have a solution, as do logarithmic ones:

 1. Fill in the number of intercepts that the given function can have: none, 1, 2, or infinitely many. 2. Indicate whether it's obvious when the given type of equation has no solution, and what it looks like when that is the case.

......that last one needs work. Not clear.

That was last week. Today I showed them this series of slides, in which I tried to summarize probably way too much about solving inequations and finding the rule for a function, again from a visual and comparative point of view:

I think I may have exploded a few heads......including my own. But I will definitely use it next year, and if you see a way to make it better, please feel free to comment.

Bottom line, I am so grateful to all my students, especially Mr. 200%, whom I shall call Albert today, and he'll know why.

Thanks for reminding me, Albert, that even though my job description is "Teacher", you and your peers truly deserve that title.

And oh yes: Catch!

1. No wonder that "Albert" has given 200% all year long - he knows you are listening to him.

2. Wheel of functions is an excellent idea!! I'm sharing on Facebook. Thank you so much!

1. I'm so glad you liked it, and thank you for sharing it! Please feel free to use and modify as you see fit, and if you get a chance, let me know how it goes over, I'm always happy to hear feedback, good or bad. Tks again! (Wish I knew your first name...)

3. I'm interested in using this in my Precal class as a year long graphic/mental organizer. Could you tell us a bit more about what information you would put in categories like "operations," "composite," "Solving equation," or "solving inequation"? Or if you have an example of what a filled out wheel of function would look like that would be really helpful.

1. Hi Matt, I just sent you a bunch of stuff, enjoy!


text:
On a constant arising in Manin's conjecture for del Pezzo surfaces

Derenthal, U (2007). On a constant arising in Manin's conjecture for del Pezzo surfaces. Mathematical Research Letters, 14(3):481-489.

Abstract

For split smooth Del Pezzo surfaces, we analyse the structure of the effective cone and prove a recursive formula for the value of alpha, appearing in the leading constant as predicted by Peyre of Manin's conjecture on the number of rational points of bounded height on the surface. Furthermore, we calculate alpha for all singular Del Pezzo surfaces of degree at least 3.

Abstract

For split smooth Del Pezzo surfaces, we analyse the structure of the effective cone and prove a recursive formula for the value of alpha, appearing in the leading constant as predicted by Peyre of Manin's conjecture on the number of rational points of bounded height on the surface. Furthermore, we calculate alpha for all singular Del Pezzo surfaces of degree at least 3.

Statistics

Citations

16 citations in Web of Science®
17 citations in Scopus®

Detailed statistics


text:
Try a numerical example, say the 3 points give a triangle of sides 12, 15 and 13. Find the radii of the circles.

Now use the same method if the sides of the triangle are $a$, $b$ and $c$?

Generalise still more: What about 4 circles? 5 circles? $n$ circles?


text:
# Neutrino 2018 - XXVIII International Conference on Neutrino Physics and Astrophysics

4-9 June 2018
Heidelberg
Europe/Berlin timezone
Home > Timetable > Session details > Contribution details

# Contribution Poster direct neutrino mass

Poster (participating in poster prize competition)

# Investigations of the KATRIN interspectrometer Penning trap

## Speakers

• Ms. Mariia FEDKEVYCH

## Authorship annotation

M. Fedkevych for the KATRIN collaboration

## Session and Location

Monday Session, Poster Wall #4 (Robert-Schumann-Room)

## Abstract content

The KArlsruhe TRItium Neutrino experiment (KATRIN) is aiming to probe the absolute neutrino mass with a sensitivity of 0.2 $\mathrm{eV/c^2}$ (90 $\%$ C.L.). It uses a pair of electrostatic spectrometers of MAC-E filter type to analyze energies of electrons from tritium-$\beta$-decay. In the region between the spectrometers, a Penning trap is created by their retarding potentials combined with the magnetic field produced by a superconducting magnet. Electrons accumulating in this trap can lead to elevated background levels or discharges that can damage parts of the spectrometer and detector section of KATRIN. To counteract this problem, so-called {\textit{Penning wipers}} were designed and installed in the beamline part between the two spectrometers to remove trapped particles. The system was tested and showed its effectiveness in suppression of the Penning trap effects. Details of the measurements and the results will be presented. This work is supported under BMBF contract 05A17PM3.

yes


text:
Proof of Theorem 6: Let $c \colon [a,b] \to X$ be a quasi-geodesic in a $\delta$-hyperbolic space $X$.  We can replace $c$ by $c' \colon [a,b] \to X$ as in Lemma 8.  Let $p = c'(a)$, $q = c'(b)$, and $x \in [p,q]$ such that $D = d(x, \textnormal{im}(c'))$ is maximal.  We need to bound $D$.  Let $y \in [p,x]$ be such that $d(x,y) = \min \lbrace d(x,p), \: 2D \rbrace$, and $z \in [x, q]$ such that $d(x,z) = \min \lbrace d(x,q), \: 2D \rbrace$.  Let $y' \in \textnormal{im}(c')$ such that $d(y,y') \le D$, and $y' \in \textnormal{im}(c')$ such that $d(z,z') \le D$.  Finally, let $\gamma$ be a path in $X$ obtained by concatenating $[y,y']$, the section of the image of $c'$ with endpoints $y'$ and $z'$, and $[z,z']$.

By construction, $\gamma$ does not intersect $B(x,D)$, and part 3 of Lemma 8 shows that

$l(\gamma) \le k_1 d(y', z') + k_2 + 2D \le k_1 (6D) + k_2 + 2D$.

Lemma 7 gives a bound on the length of paths based on the distance between their endpoints:

$D \le \delta \log_2 (l(\gamma)) + 1 \le \delta \log_2 (k_1 (6D) + k_2 + 2D) + 1$.

The left hand side of this inequality increases linearly in $D$, while the right increases logarithmically, so that $D$ must be bounded above for the equality to hold, and clearly this upper bounded depends only on the constants $k_1$, $k_2$ and $\delta$QED.

It now makes sense to make the following definition.

Definition: A finitely generated group $\Gamma$ is called (word-) hyperbolic if some (any) Cayley graph for $\Gamma$ is Gromov-hyperbolic.  Equivalently, a group $\Gamma$ is hyperbolic if it acts properly discontinuously and cocompactly by isometries on a proper Gromov-hyperbolic metric space.

Examples:

a) Free groups
b) $\mathbb{Z}^n$ is not hyperbolic for $n > 1$.
c) Let $M$ be any closed hyperbolic manifold.  Then $\pi_1(M)$ is word-hyperbolic.
d)  More generally, $\pi_1(M)$ is word-hyperbolic for any $M$ with negative sectional curvature bounded away from $0$.

Without getting into too much detail, we briefly mention the following theorem of Gromov as an indication of how general the class of hyperbolic groups really is.

Theorem (Gromov): A “randomly chosen” finitely presented group is “almost surely” word-hyperbolic.

Definition: A subspace $Y$ of a geodesic metric space $X$ is quasiconvex if there exists a $K \ge 0$ such that, for all $y_1, y_2 \in Y$ and for all $x \in [y_1, y_2]$, $d(x, Y) \le K$.

Example: Consider $\mathbb{Z}^2$ with the $\ell^1$-metric.  Then the diagonal subgroup $\Delta \subset \mathbb{Z}^2$ is not quasiconvex (though it is quasi-embedded).

Theorem 6 implies that this kind of poor behavior does not occur in hyperbolic space.

Corollary: Suppose that $\Gamma$ is a word-hyperbolic group and $H$ is a subgroup.  Then $H$ is quasiconvex in some (any) Cayley graph of $\Gamma$ if and only if $H$ is finitely generated and $H \hookrightarrow \Gamma$ is a quasi-embedding.

Proof:  $(\Leftarrow)$ is immediate from Theorem 6.  For the other direction, fix a generating set $S$ for $\Gamma$, assume $H$ is quasiconvex in the Cayley graph of $\Gamma$ with constant $K$, and let $h$ be in $H$.  Consider a geodesic in the Cayley path of $\Gamma$ from $1$ to $h$, which we can take to be of the form $s_1...s_n$ for $s_i$ in $S$.  Let $v_i$ be the vertices of this geodesic, so $v_i= s_1...s_i$.

By quasiconvexity, for each $v_i$ there exists $g_i$ in $H$ such that $d(v_i,g_i) \leq K$.  Take $g_0=1$ and $g_n=h$.  Let $h_i=g_{i-1}^{-1}g_i$, so $h=h_1... h_n$.  Let $u_i=v_ig_i^{-1}$.  Note that $l_S(u_i)\leq K$.  For each $i$, we have that $h_i=u_is_iu_{i+1}^{-1}$ and so $l_S(h_i)\leq 2K+1$.  Therefore, $H$ is generated by $T=B(1,2K+1)\cap H$, a finite set.  Furthermore, we have shown that $l_T(h)\leq n=l_S(h)$.

But it’s clear that $l_S(h)\leq (2K+1)l_T(h)$ (as each element of $T$ has $S$-length at most $2K+1$) so the inclusion of $H$ into $\Gamma$ is a quasi-isometric embedding.  QED.

In light of this, the following definition makes sense

Definition: A subgroup $H$ of a hyperbolic group $\Gamma$ is called quasiconvex if it is a quasiconvex space of some (any) Cayley graph of $\Gamma$.

Exercise 14: If $G \stackrel{\rho}{\longrightarrow} H$ is a retraction and $G$ is finitely generated, then the inclusion $H \hookrightarrow G$ is a quasi-isometric embedding.  (Hint: you can choose a generating set $S$ for $G$ such that $\rho(s) = s$ or $\rho(s) = 1$ for all $s \in S$.

Example: Marshall Hall’s Theorem implies that every finitely generated subgroup of a free group is a retract of a finite-index subgroup, so every finitely generated subgroup of a free group is quasiconvex.


text:
Journal article Open Access

# Hydrothermal Carbonization Brewer's Spent Grains with the Focus on Improving the Degradation of the Feedstock

Pablo J. Arauzo; Maciej P. Olszewski; Andrea Kruse

### Citation Style Language JSON Export

{
"DOI": "10.3390/en11113226",
"author": [
{
"family": "Pablo J. Arauzo"
},
{
"family": "Maciej P. Olszewski"
},
{
"family": "Andrea Kruse"
}
],
"issued": {
"date-parts": [
[
2018,
11,
21
]
]
},
"abstract": "
Hydrochar is a very interesting product from agricultural and food production residues. Unfortunately, severe conditions for complete conversion of lignocellulosic biomass is necessary, especially compared to the conversion of sugar compounds. The goal of this work is to improve the conversion of internal carbohydrates by application of a two-steps process, by acid addition and slightly higher water content. A set of experiments at different temperatures (180, 200, and 220 °C), reaction times (2 and 4 h), and moisture contents (80% and 90%) was performed to characterize the solid (high heating value (HHV), elemental) and liquid product phase. Afterwards, acid addition for a catalyzed hydrolysis reaction during hydrothermal carbonization (HTC) and a two-steps reaction (180 and 220 °C) were tested. As expected, a higher temperature leads to higher C content of the hydrochar and a higher fixed carbon (FC) content. The same effect was found with the addition of acids at lower temperatures. In the two-steps reaction, a primary hydrolysis step increases the conversion of internal carbohydrates. Higher water content has no significant effect, except for increasing the solubility of ash components.
",
"title": "Hydrothermal Carbonization Brewer's Spent Grains with the Focus on Improving the Degradation of the Feedstock",
"type": "article-journal",
"id": "3764752"
}
19
18
views


text:
# “Invariance of Domain” theorem on Rotman's “An Introduction to Algebraic Topology”

Here is Rotman's proof for the theorem:

(Theorem 6.31 says that if $S^n$ contains an $r$-cell $e_r$, then $S^n-e_r$ is acyclic. Theorem 6.35 is the Jordan-Brouwer Separation Theorem.)

However, the "Invariance of Domain" theorem is often stated as following:

Theorem 1. If $U$ is an open subset of $\mathbb{R}^n$ and $f : U \rightarrow \mathbb{R}^n$ is an injective continuous map, then $V = f(U)$ is open and $f$ is a homeomorphism between $U$ and $V$.

I tried to generalize the theorem on Rotman's book get the above result. Then I started to realize that the condition of "homeomorphism" might be unnecessary: The proof still works if $h$ is only bijective and continuous. Is that right? If it's right we can show $f$ is an open map in Theorem 1. The result then follows. Are there any mistakes I made?

Yes, this is correct. The key point is that the proof only actually uses the restriction of $h$ to $N$, which is then automatically a homeomorphism to its image since $N$ is compact.
Alternatively, you can use a similar idea to deduce the statement for continuous injections from the statement for homeomorphisms. For if $U\subseteq\mathbb{R}^n$ and $f:U\to\mathbb{R}^n$ is a continuous injection, consider any open ball $B$ such that $\overline{B}\subseteq U$. Then $f$ is a homeomorphism to its image when restricted to $\overline{B}$, and thus a homeomorphism to its image when restricted to $B$. The result for homeomorphisms now gives that $f(B)$ is open in $\mathbb{R}^n$. Since every open subset of $U$ is a union of such balls $B$, this shows $f$ is an open map, and hence a homeomorphism to its image.


text:
# HLM (the program) to R Conversion

#### trinker

##### ggplot2orBust
I am taking a multilevel modeling class and reading Raudenbush and Bryk and using the accompanying HLM program for the class.

My assignments will need to be completed with HLM but I want to learn how the models work in R's lme4 syntax as well.

This weeks lab had us run 3 models: fully unconditional, partially conditional and fully conditional. Here is the HLM output for each:

fully unconditional
http://htmlpreview.github.io/?https://github.com/trinker/HLM2R/blob/master/fully unconditional.html

partially conditional
http://htmlpreview.github.io/?https.../HLM2R/blob/master/partially conditional.html

fully conditional
http://htmlpreview.github.io/?https://github.com/trinker/HLM2R/blob/master/fully conditional.html

I have tried to replicate this with the following R script (this will load the data and group center the SES variable):

Code Book
id: school ID number
minority: indicator of student minority race/ethnicity; 1 = minority, 0 = not minority
female: indicator of student gender; 1 = female, 0 = male
ses: standardized composite representing socioeconomic status; constructed from
variables measuring parent education, income, and occupation
mathach: mathematics achievement test score
size: total school enrollment
sector: type of school; 1 = Catholic, 0 = public
disclim: a scale measuring disciplinary climate
himinty: level of minority enrollment; 1 ≥ 40%, 0 = < 40%
meanses: mean SES value for the students who are in the level-1 file and attend this school

Code:
## Load data and lme4
library(lme4)

## Group Center Variables
dat$cent_ses <- with(dat, ses - ave(ses, id)) ## Fully Unconditional fu_mod <- lmer(mathach ~ 1 + (1 | id), data=dat) summary(fu_mod) ## Partially Conditional pc_mod <- lmer(mathach ~ cent_ses + (1 | id), data=dat) summary(pc_mod) ## Fully Conditional fc_mod <- lmer(mathach ~ cent_ses + (1 | id) + (1 | meanses) +(id | sector), data=dat) summary(fc_mod) Questions: 1. I think I have replicated the fully unconditional and partially unconditional models correctly. How can I specify the fully conditional model in R that matches the HLM otput? 2. How can I get the reliabilities from lme4? 3. They use a Chi Squared test and log liklihood to look at final variance effect. How can I get lme4 to get this output? For the Fully Conditional Model Code: Random Effect Stan.Deviation Variance d.f. χ2 p-value INTRCPT1, u0 1.54271 2.37996 157 605.29503 <0.001 SES slope, u1 0.38590 0.14892 157 162.30867 0.369 level-1, r 6.05831 36.70313 I assume the anova function but am unsure of which models to compare to which. I think maybe it's compared to the previous but am unsure and anova(fu_mod, pc_mod) doesn't give me the table from http://htmlpreview.github.io/?https.../HLM2R/blob/master/partially conditional.html Thank you in advance. My TA sent me the lab (not graded) so I could compare: http://htmlpreview.github.io/?https...r/HLM,lab1,output, including all 3 models.htm #### trinker ##### ggplot2orBust Lazar gave an idea for the fully conditional mode (seen at bottom of link page), below but this doesn't match. I need fixed effects for the slopes and fixed effects for the intercepts but don't understand the syntax to get that. Code: load(url("http://dl.dropboxusercontent.com/u/61803503/data/HSB.RData")) library(lme4) ## Group Center Variables dat$cent_ses <- with(dat, ses - ave(ses, id))

lazar_mod <- lmer(mathach ~ ses + meanses + sector + (1+ses | id), data=dat)
summary(lazar_mod)

Output

Code:
> summary(lazar_mod)
Linear mixed model fit by REML ['lmerMod']
Formula: mathach ~ ses + meanses + sector + (1 + ses | id)
Data: dat

REML criterion at convergence: 46547.47

Random effects:
Groups   Name        Variance Std.Dev. Corr
id       (Intercept)  2.432   1.5595
ses          0.473   0.6877   0.27
Residual             36.784   6.0649
Number of obs: 7185, groups: id, 160

Fixed effects:
Estimate Std. Error t value
(Intercept)     12.0245     0.2011   59.80
ses              2.1961     0.1224   17.94
meanses          3.1552     0.3881    8.13
sectorCatholic   1.4083     0.3091    4.56

Correlation of Fixed Effects:
(Intr) ses    meanss
ses          0.074
meanses      0.243 -0.260
sectorCthlc -0.693  0.002 -0.334

I need to get 2 fixed effects for the level 2 predictors (sector and mean_ses) after regressing on group centered ses on math achievement . I know this isn't the preffered language but right now that's what I know (level 1 and level 2) and I haven't been able to move my thinking to a one equation model which lme4 seems to be based on.

#### Lazar

##### Phineas Packard
Code:
Linear mixed model fit by REML ['lmerMod']
Formula: mathach ~ cent_ses + meanses + sector + cent_ses * meanses +      cent_ses * sector + (1 + cent_ses | id)
Data: dat

REML criterion at convergence: 46503.66

Random effects:
Groups   Name        Variance Std.Dev. Corr
id       (Intercept)  2.3795  1.5426
cent_ses     0.1013  0.3183   0.39
Residual             36.7212  6.0598
Number of obs: 7185, groups: id, 160

Fixed effects:
Estimate Std. Error t value
(Intercept)              12.0960     0.1987   60.87
cent_ses                  2.9388     0.1551   18.95
meanses                   5.3329     0.3692   14.45
sectorCatholic            1.2265     0.3063    4.00
cent_ses:meanses          1.0389     0.2989    3.48
cent_ses:sectorCatholic  -1.6426     0.2398   -6.85

Correlation of Fixed Effects:
(Intr) cnt_ss meanss sctrCt cnt_s:
cent_ses     0.075
meanses      0.245  0.019
sectorCthlc -0.697 -0.053 -0.356
cnt_ss:mnss  0.018  0.282  0.074 -0.026
cnt_ss:sctC -0.052 -0.694 -0.027  0.077 -0.351
Gives same result. Note you should be using cent_ses not ses to get same results.

#### trinker

##### ggplot2orBust
OK Lazr said throw in the interactions. Yepper that answers question 1:

Code:
load(url("http://dl.dropboxusercontent.com/u/61803503/data/HSB.RData"))
library(lme4)

## Group Center Variables
dat$cent_ses <- with(dat, ses - ave(ses, id)) lazar_mod <- lmer(mathach ~ cent_ses*meanses + cent_ses*sector + (1+ses | id), data=dat) summary(lazar_mod) #### Lazar ##### Phineas Packard Sorry about that. I misread the model due to the stupid R and B notation and did not see the interactions. #### spunky ##### Doesn't actually exist How can I get the reliabilities from lme4? this is, unfortunately, not particularly straight-forward to do on lme4. please, keep in mind that many of the indices generated on HLM are geared towards social scientists and lme4 wasn't designed with us in mind looking around Raudenbush's notes (or whatever the F his name is) i was able to find out that he defines reliability as: $$\lambda_{j}=\frac{\tau_{00}}{\tau_{00}+\widehat{\sigma}^{2}/n_{j}}$$ which means that for every individual cluster you can calculate a reliability index $$\lambda_{i}$$ the number that gets printed under Reliability estimate is the average of all the lambdas. i thought maybe some kind soul out there may have developed a function to do this already, but the only thing i was able to find is the GmeanRel() function in the 'multilevel' package, which adds quite a few statistics that can be calculated from the output of a linear mixed effects model (such as intra-class correlations and whatnot). very fancy package, i must say... but there is one major drawback: it assumes models are fitted using nlme instead of lme4. for example, in order to get the same reliability estimate to match your HLM output on the unconditional model you would do: Code: library(nlme) library(multilevel) tmod <- lme(mathach ~ 1, random=~1|id, data=dat) mean(GmeanRel(tmod)$MeanRel)

> mean(GmeanRel(tmod)$MeanRel) [1] 0.9013773 which is, i believe, what you are looking for. now, although it seems to give you the answer you'd like for the reliability index of the partially-conditional model Code: library(multilevel) library(nlme) tmod1 <- lme(mathach ~ 1 + cent_ses, random=~1+cent_ses|id, data=dat) mean(GmeanRel(tmod1)$MeanRel)

[1] 0.9075635
i don't think the GmeanRel() function works for anything outside from the reliability index associated with the intercepts. you'll probably need to code your own function that fits each within-cluster regression, save the coefficients, calculate their variance and obtain the other lambda indices that HLM gives you.

#### Lazar

##### Phineas Packard
oh btw the answer to question three is anova(M1,M2,M3) like you suggested

#### spunky

##### Doesn't actually exist
oh btw the answer to question three is anova(M1,M2,M3) like you suggested
but how would he test for the significance of the random effects on the intercept-only model?

sure, anova() works once you have random effects present but to test whether there is a random effect for the intercept only it will spit profanities at you. he needs to start testing from a model that has no random effects for anything to one that has one for the intercept.

#### spunky

##### Doesn't actually exist
They use a Chi Squared test and log liklihood to look at final variance effect. How can I get lme4 to get this output?
just to be sure that you didn't miss my post in the chatbox, lme4 will not give you the chi-square test that the variance component $$H_{0}:\sigma^{2}=0$$. lemme quote Faraway to explain why:

"In most cases, a test of random effects will involve a hypothesis of the form $$H_{0}:\sigma^{2}=0$$. The standard derivation of the asymptotic χ2 distribution for the likelihood ratio statistic depends on the null hypothesis lying in the interior of the parameter space. This assumption is broken when we test if a variance is zero. The null distribution in these circumstances is unknown in general and we must resort to numerical methods if we wish for precise testing. If you do use the χ2 distribution with the usual degrees of freedom, then the test will tend to be conservative—the p-values will tend to be larger than they should be. This means that if you observe a significant effect using the χ2 approximation, you can be fairly confident that it is actually significant.

now...testing (nested) models where you have random effects is relatively easy with the anova() function, right? you just do anova(smaller_model, larger_model) where you only added one random effect and, based on your p-value, you can asses its significance. the first step is the tricky one because you're basically testing a model with no random effects (so a straight regression) VS one that does have random effects.

if you try to fit a model with no random effects in lme4 you get:

Code:
fu_mod <- lmer(mathach ~ 1, data=dat)
Error in mkReTrms(findbars(formula[[3]]), fr) :
No random effects terms specified in formula
so we need to do some statistical trickery here if you wish to do everything on lme4. i'll take you by the hand and will list this in steps.

step #1

we need to fit a model (let's call it a null_model) that has no random effects and just fixed effects. in this case, that means fitting an OLS regression to your data which you will do using the lm() function. lmer() will spit profanities at you if you don't specify random effects so we'll use lm() here. this is going to be your baseline model against which you'll compare the model with a random effect for the intercept:

Code:
null_model  <- lm(mathach ~ 1, data=dat)
step #2

we're just going to fit the alternative model this time, the one with random effects and i'm gonna call it mixed_model to differentiate it

Code:
mixed_model <- lmer(mathach ~ 1 + (1 | id), data=dat)
as you can see, the difference between null_model and mixed_model is that one has a random effect for the intercept and the other one does not.

step #3

this is the tricky part because it assumes you know how a likelihood ratio test works. anova() will not work here because of the difference between fitting a model with lm() and lmer():

Code:
mixed_model <- lmer(mathach ~ 1 + (1 | id), data=dat)
null_model  <- lm(mathach ~ 1, data=dat)

anova(mixed_model, null_model)
Error in UseMethod("refitML") :
no applicable method for 'refitML' applied to an object of class "lm"
but that doesn't mean we cannot get the components that make up this test, i.e. the loglikelihoods. so we're gonna extract the log-likelihood for the null_model and the mixed_model as follows:

Code:
log_likelihood_null_model <- logLik(null_model)

log_likelihood_mixed_model <- logLik(mixed_model)
and we will combine them as follows (for reasons that you don't need to concern yourself with at the present moment):

Code:
diff_lik <- as.numeric(2*(log_likelihood_mixed_model-log_likelihood_null_model))

step #4

awesome! now you have the difference of log-likelihoods! and that distributes as a chi-square! so all we need to do is go and get a p-value using the chi-square as the reference distribution and that should be it!

Code:
pchisq(diff_lik,1,lower=FALSE)
[1] 9.179927e-216
which is a REALLY small number and matches the p<.001 on the HLM output, so you can conclude that the random effect for the intercept is, indeed, significant.

once you've moved on from this step, you can just use anova() to test the rest of your effects. now, we are technically still "wrong" in using the chi-square distribution as our reference distribution here, but, as Faraway said, since we got significance we can run away with it.

if you want a more precise test you can ask Jake for the bootstrapped likelihood ratio test thingy i once sent to him many-a-nights ago. he should have it somewhere.

#### Lazar

##### Phineas Packard
Code:
m1 <- lmer(mathach ~ 1, data=dat)
m2 <- lmer(mathach ~ 1 + (1|id), data=dat)
AIC(m1); AIC(m2);
Not sure would have to think about it

EDIT 2: m1 lm not lmer

#### spunky

##### Doesn't actually exist
Code:
m1 <- lmer(mathach ~ 1, data=dat)
m2 <- lmer(mathach ~ 1 + (1|id), data=dat)
AIC(m1); AIC(m2);
Not sure would have to think about it

if you fit a model without random effects in lme4 it spits profanities back at you. take a look:

Code:
> m1 <- lmer(mathach ~ 1, data=dat)
Error in mkReTrms(findbars(formula[[3]]), fr) :
No random effects terms specified in formula

#### spunky

##### Doesn't actually exist
now i can go to bed... it's past 2:30am here!

question #2 is still somewhat open for those reliability indices for the regression coefficients. more research is needed here...

#### trinker

##### ggplot2orBust
Thank you both for spending a great deal of time to help me match the HLM output and explaining why some aspects of the output aren't exactly best practice.

PS it's funny because I tried the anova thing using the lm model without random effects (I knew this much) but as you point out this didn't work. And I knew from Gelman and Hill (I think I read or maybe a lme4 tutorial) that you can't fit a model in lme4 w/o random effects. I didn't think about extracting the logLike, though I knew you could do this from when I studied logistic regression it had been so long I forgot you could do that.

Spunky walked us all through the night I was having and explained a typical student's stupidity.

So if I get this right testing for
with anova function is a no go because you break the assumption that "the standard derivation of the asymptotic χ2 distribution for the likelihood ratio statistic depends on the null hypothesis lying in the interior of the parameter space". The way to test this if I want to be a good boy is to use bootstrapping magic.

Also on the reliabilities where
and then you sum and divide by J, $$\frac{\sum\lambda_j}{J}$$, I was a bit surprised this wasn't more readily available in R. In meta-analysis (I may be wrong as I'm trying to connect to concepts but haven't full overlapped the two) this is a very important stat that is called Q that gets spit out right away in the metafor package as it's extremely important.

Again this thinking is most likely inaccurate, incomplete or just plain wrong but I'm processing through it all. I'm pleased I have some very knowledgeable peeps to help me work through it.

#### spunky

##### Doesn't actually exist
So if I get this right testing for
with anova function is a no go because you break the assumption that "the standard derivation of the asymptotic χ2 distribution for the likelihood ratio statistic depends on the null hypothesis lying in the interior of the parameter space". The way to test this if I want to be a good boy is to use bootstrapping magic.
well... I wouldn't go as far as saying it's a "no go". because it has less power than a regular test you can maybe try it first. if significant, then carry on with the analysis. if non-significant (and the random effect is "large"), then proceed with the bootstrap.

In meta-analysis (I may be wrong as I'm trying to connect to concepts but haven't full overlapped the two) this is a very important stat that is called Q that gets spit out right away in the metafor package as it's extremely important.

Again this thinking is most likely inaccurate, incomplete or just plain wrong but I'm processing through it all. I'm pleased I have some very knowledgeable peeps to help me work through it.
have you tried to fit your models using the meta package? I don't do metanalysis, but you may be right. maybe you just need to re-frame these models in some way the metafor package can estimate them so you get that Q statistic.

#### trinker

##### ggplot2orBust
have you tried to fit your models using the meta package? I don't do metanalysis, but you may be right. maybe you just need to re-frame these models in some way the metafor package can estimate them so you get that Q statistic.
Hmm interesting idea.

#### trinker

##### ggplot2orBust
@Spunky why do you multiple the differences between models by 2 in this post:

Code:
diff_lik <- as.numeric(2*(log_likelihood_mixed_model-log_likelihood_null_model))

#### trinker

##### ggplot2orBust
@Dason specifically...?

The test statistic (often denoted by D) is twice the difference in these log-likelihoods

#### trinker

##### ggplot2orBust
Chatbox info on p-values that Doug Bates detests:

trinker said:
So if one knew it was wrong to calculate pvalues but still did and the had N = 8000, J - 348...
Jake said:
but a rough rule of thumb you could use for a 2-level hierarchical model is that if the predictor varies within schools, N - J will be close, while if it varies within schools, J will be close (but note both of these ignore number of parameters)
spunky said:
JAke! we summon thee and thy power to correct our misguided p-values!
Jake said:
you can use lmerTest for welch-satterthwaite, or pbkrtest for kenward-roger. i prefer the latter package but both are good
there are also approaches not based on degrees of freedom;
see the R glmm FAQ wiki;
spunky said:
non-degrees-of-freedom approach to significance testing? what is this sorcery you speak of?
Jake said:
note both of these are only valid for linear mixed models (not generalized). most of the other approaches work on both LMMs and GLMMs
Dason said:
@spunky - permutation/randomization tests don't rely on degrees of freedom
Jake said:
all kinds of stuff spunky. parametric bootstrap, LRT, MCMC (your favorite?!), Wald test, ...